-
• #2
Hi - I'm afraid there's no
Map
object built into Espruino.But what do you actually want to use it for? By default objects work basically the same way...
a = {}; a["foo"] = 42; // put console.log(a["foo"]); // get console.log("foo" in a); // check if inside delete a["foo"] // remove // ...
-
• #3
! I hadn't considered using them like that, thanks!
Code that works in my browser/Node.js uses "new Map()" but on my Pixl I'm getting:
Uncaught ReferenceError: "Map" is not defined
Is there a require("something") I need to call first?