2 ms·
No, arrays are just objects with a magic "length" property (technically: a special [[DefineOwnProperty]] internal method which sometimes also mutates "length").
by gsnedders 5y ago
No, arrays are just objects with a magic "length" property (technically: a special [[DefineOwnProperty]] internal method which sometimes also mutates "length"). Like objects, they only support strings as keys.
c.f. https://tc39.es/ecma262/#sec-array-exotic-objects https://tc39.es/ecma262/#sec-array-exotic-objects