Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 323 Bytes

File metadata and controls

15 lines (11 loc) · 323 Bytes

Map() Keys can be empty-string, null or undefined

In JS, empty-string, null and undefined can be the keys of Map()

let map = new Map()

map.set("", "empty?")
map.set(null, "null?")
map.set(undefined, "undefined?")

map.get("") //?  empty?
map.get(null) //?  null?
map.get(undefined) //?  undefined?