crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>JavaScript Maps</h2> <p>Clearing a Map:</p> <p id="demo"></p> <script> // Create a Map const fruits = new Map([ ["apples", 500], ["bananas", 300], ["oranges", 200] ]); // Clear the Map fruits.clear(); document.getElementById("demo").innerHTML = fruits.size; </script> </body> </html>
JavaScript Maps
Clearing a Map: