javascript array if element exists