Y
Hacker News
new
|
ask
|
show
|
jobs
by
hazebooth
1083 days ago
I think for the first point you wanted a block that evaluated to the map, unsure if that’s what you wanted though
1 comments
bodge5000
1082 days ago
I think so, if I write it out in pseudo code it might make more sense. What I was trying to do was pretty much:
const mymap = {1: "hello", 2: "world"};
But the only thing I could find any answers for was something more like:
const mymap; mymap.put(1, "hello"); mymap.put(2, "world");
link