<!DOCTYPE html>
<html>
<body>
<h2>JavaScript イテラブル</h2>
<p>文字列を反復処理します。</p>
<p id=""demo""></p>
<script>
// 文字列を作成する
const name = ""W3Schools"";
// すべての要素をリストする
let text = """"
for (const x of name) {
text += x + ""<br>"";
}
document.getElementById(""demo"").innerHTML = text;
</script>
</body>
</html>