I\'m used to python, so
a = [1,2,3] 1 in a # -> True b = [\"1\", \"2\", \"3\", \"x\"] \"x\" in b # -> True
Why is it that in JavaScript>
Because "x" in b is looking for a property name 'x'. There is none, they are all numerical (but still string) property names, considering it is an array.
"x" in b
'x'