Javascript check if element exists in array. to check if it exists: Vanilla .