pronoobP
Denoβ€’3y agoβ€’
3 replies
pronoob

What is the difference between JS Map and JS Object?

I know that 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");

vs
const x = { foo: "bar" };
Was this page helpful?