Say I have several objects on the heap:
const x = {foo:'bar'};
const y = {foo:'bar'};
const z = {foo:'bar'};
Is there a way to put them in a hash like this:
const c = {x: 'yolo', y: 'rolo', z: 'cholo'};
the only way this can work is: xy and z were represented by their locations in memory. I think this is possible in some languages, is it possible with JS?
source
share