clear
const m = new Map([['a', 1], ['b', 2]]) m.clear() console.log(m.size) // β 0
Use Map.clear() to remove all key-value pairs from the map.
clear() returns undefined.
clear()
undefined
Challenge: Verify that the return value of clear() is undefined.