crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>JavaScript Map Objects</h2> <p>Using Map.values():</p> <p id="demo"></p> <script> // Create a Map const fruits = new Map([ ["apples", 500], ["bananas", 300], ["oranges", 200] ]); let total = 0; for (const x of fruits.values()) { total += x; } document.getElementById("demo").innerHTML = total; </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KPGgyPkphdmFTY3JpcHQgTWFwIE9iamVjdHM8L2gyPg0KPHA+VXNpbmcgTWFwLnZhbHVlcygpOjwvcD4NCg0KPHAgaWQ9ImRlbW8iPjwvcD4NCg0KPHNjcmlwdD4NCi8vIENyZWF0ZSBhIE1hcA0KY29uc3QgZnJ1aXRzID0gbmV3IE1hcChbDQogIFsiYXBwbGVzIiwgNTAwXSwNCiAgWyJiYW5hbmFzIiwgMzAwXSwNCiAgWyJvcmFuZ2VzIiwgMjAwXQ0KXSk7DQoNCmxldCB0b3RhbCA9IDA7DQpmb3IgKGNvbnN0IHggb2YgZnJ1aXRzLnZhbHVlcygpKSB7DQogIHRvdGFsICs9IHg7DQp9DQoNCmRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJkZW1vIikuaW5uZXJIVE1MID0gdG90YWw7DQo8L3NjcmlwdD4NCg0KPC9ib2R5Pg0KPC9odG1sPg==