2 ms·
The {} object uses only strings as keys. You need to use: var d = new Map(); d.set(array1, 'xyz'); print(d.get(array2)); (Map is new in ES2015, but Node
by tlb 9y ago
The {} object uses only strings as keys. You need to use:
var d = new Map();
d.set(array1, 'xyz');
print(d.get(array2));
(Map is new in ES2015, but Node and all the browsers have it now).