If I have a Map
in JavaScript, e.g
const myMap = new Map()
myMap.set(0, 'zero')
myMap.set(1, 'one')
Then both of these two seem to be valid to iterate through the key-value pairs (and many other options which I am currently not interested in):
// with .entries()
for (const [key, value] of myMap.entries()) {
//
}
// without
for (const [key, value] of myMap) {
//
}
Is there any edge case where they do not do the same?