<!DOCTYPE html>
<html>
<body>
<h2>用JS遍历数据结构图(MAP)</h2>
<p>遍历佳学基因检测数据结构图</p>
<p id="demo"></p>
<script>
// 建立基因检测项目数据结构图
const 基因检测项目 = new Map([
["肿瘤靶向药物基因检测", 2400],
["精神病用药指导基因检测", 1500],
["遗传病致病基因鉴定基因检测", 5900]
]);
// List all entries
let text = "";
for (const x of 基因检测项目) {
text += x + "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
运行结果: