This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
Deleting Map elements:
// Create a Map const fruits = new Map([ ["apples", 500], ["bananas", 300], ["oranges", 200] ]); // Delete an Element fruits.delete("apples"); document.getElementById("demo").innerHTML = fruits.size;
The
property returns the number of elements in a Map: