Last active
January 30, 2022 13:43
-
-
Save L4Ph/e5dcc473e0ad73f1d4aec700d286bd83 to your computer and use it in GitHub Desktop.
2022-01/29 課題
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <meta charset="utf-8"> | |
| 5 <meta name="viewport" content="width=device-width"> | |
| 6 <title>replit</title> | |
| 7 <link href="style.css" rel="stylesheet" type="text/css" /> | |
| 8 </head> | |
| 9 <body> | |
| 10 <script src="script.js"></script> | |
| 11 </body> | |
| 12 </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.write('シングルクォートは'という記号のこと<br>'); | |
| // 変数の宣言 | |
| var a; | |
| // 変数に代入 | |
| a = 100; | |
| // 変数の初期化 | |
| var b = 200; | |
| document.write(a); | |
| document.write('<br>'); | |
| document.write(b); | |
| document.write('<br>'); | |
| // 変数に文字列を入れる | |
| var x = 'JavaScriptの変数'; | |
| document.write(x); | |
| document.write('<br>'); | |
| // テキストP102 | |
| var before = 1000000; | |
| var mul = 1.06 ** 10;//1,06の10乘 | |
| var after = before * mul; | |
| var answer = after - before; | |
| document.write(answer); | |
| document.write('<br>'); | |
| //練習P104課題 | |
| // 比較演算子 | |
| document.write(2 > 1); | |
| document.write('<br>'); | |
| // 型が違ってもOK | |
| document.write(1 == '1'); | |
| document.write('<br>'); | |
| // 型が一致しないとダメ | |
| document.write(1 === '1'); | |
| document.write('<br>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment