We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d581e2 commit 5da31d5Copy full SHA for 5da31d5
3 files changed
docs/1-trial-session/06-variables/_samples/compound-assignment/index.html
@@ -0,0 +1,10 @@
1
+<!doctype html>
2
+<html lang="ja">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Title</title>
6
+ </head>
7
+ <body>
8
+ <script src="./script.js"></script>
9
+ </body>
10
+</html>
docs/1-trial-session/06-variables/_samples/compound-assignment/script.js
@@ -0,0 +1,3 @@
+let price = 100;
+price = price / 2;
+document.write(price);
docs/1-trial-session/06-variables/index.mdx
@@ -90,6 +90,8 @@ price = price / 2;
90
document.write(price);
91
```
92
93
+<ViewSource url={import.meta.url} path="_samples/compound-assignment" />
94
+
95
{/* prettier-ignore */}
96
<Term>代入</Term><Term>演算子</Term>は、まず右辺の<Term>式</Term>を<Term>評価</Term>します。これにより、右辺は`100 / 2`となります。よって、最終的に<Term>変数</Term>`price`の<Term>値</Term>は`50`となり、これは`price`を半分にする操作に対応します。
97
0 commit comments