x
 
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript For Of 循环</h2>
<p>for of 语句循环遍历任何可迭代对象的值:</p>
<p id="demo"></p>
<script>
const cars = ["BMW", "Volvo", "Mini"];
let text = "";
for (let x of cars) {
  text += x + "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>