Skip to content

Commit a70b65f

Browse files
committed
ループの章のview source 追加
1 parent 1bdb2c0 commit a70b65f

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!doctype html>
2+
<html lang="ja">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>ネストされたループ</title>
6+
</head>
7+
<body>
8+
<script src="./script.js"></script>
9+
</body>
10+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
for (let x = 0; x < 5; x += 1) {
2+
for (let y = 0; y < 5; y += 1) {
3+
document.write(`(x, y) = (${x}, ${y})<br>`);
4+
}
5+
}

docs/1-trial-session/10-loop/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ for (let x = 0; x < 5; x += 1) {
135135
}
136136
```
137137

138+
<ViewSource url={import.meta.url} path="_samples/nested-loop" />
139+
138140
:::tip[テンプレートリテラル]
139141

140142
テンプレートリテラルは、文字列をプログラム中に記述する方法の一種です。ただ、文字列中に別の式を埋め込めるという特徴があります。

0 commit comments

Comments
 (0)