What is the return value when accessing a Map object's element with a non-existing key?

  • undefined
  • nan
  • KeyError
  • FALSE
When accessing a non-existing key in a Map, the result is undefined. This behavior is different from objects, where accessing a non-existing property returns undefined.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *