DenoDDeno
Powered by
pronoobP
Denoβ€’3y agoβ€’
3 replies
pronoob

What is the difference between JS Map and JS Object?

I know that
Map
Map
is hash table implementation for JS, but how does it differ from an object? With regards to how Python dictionaries work, there seems to be no difference.
const x = new Map();
x.set("foo", "bar");
const x = new Map();
x.set("foo", "bar");

vs
const x = { foo: "bar" };
const x = { foo: "bar" };
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

What is the difference between these two imports? And which one should I use?
Manik Islam MahiMManik Islam Mahi / help
16mo ago
What is the difference between importing "preact" via esm.sh or npm:...?
begoonBbegoon / help
3y ago
FFI Difference between buffer and pointer
javiJjavi / help
4y ago
Difference between "deno test" and "VSCode Runner UI"
ZwifsZZwifs / help
2y ago