I'm using repl.it/languages/javascript.
Do I have to convert it to an object before I print it out?
I've tried
const mapObject = new Map();
mapObject.set(1, 'hello');
console.log(JSON.stringify(mapObject));
console.log(mapObject);
The results are always empty object.
When I use
console.log([...mapObject]);
It prints out an array format.