Closed Poordeveloper closed 8 years ago
a.set(1, 2) a.without(1) does not work, but '1' works.
This is because JavaScript objects only use strings for keys, not numbers.
But a[1] and a['1'] both work, how do you explain?
JavaScript treats a[1] as the same as a["1"] when a is an object.
a[1]
a["1"]
a
a.set(1, 2) a.without(1) does not work, but '1' works.