I have the following code in Javascript:
var myArray = {"a":21600904, "b":21100999, "c":21602019, "d":21704354, "e":21602271, "f":21500123};
console.log(Object.values(myArray));
console.log(21600904 in Object.values(myArray));
And I get the following output:
[ 21600904, 21100999, 21602019, 21704354, 21602271, 21500123 ]
false
But this was not what I expected. What I understand is, 21600904
is inside Object.values(myArray)
but 21600904 in Object.values(myArray)
returns false instead of true.
What am I missing here? Why this code does not print true
?