What does the following syntax mean:
1 in [1,2,3,5]
I know it doesn\'t search for 1 in the array. But what does it do?
I\'ve seen it u
It looks like a cheap way not to use a traditional for loop for each item in the array.
for
Your 2nd example is a for-each loop. It doesn't have the literal 1 (one).
1