<html><body><h1>JavaScript Map 对象</h1><h2>values() 方法</h2><p id="demo"></p><script>// 创建一个映射const fruits = new Map([ ["apples", 500], ["bananas", 300], ["oranges", 200]]);// 遍历映射的值let text = "";for (const x of fruits.values()) { text += x + "<br>";}document.getElementById("demo").innerHTML = text;</script></body></html>