File tree Expand file tree Collapse file tree 6 files changed +10
-14
lines changed
3-web-servers/08-cookie/_samples/profile Expand file tree Collapse file tree 6 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -105,14 +105,14 @@ JavaScript の実行がブレークポイントを設定した地点に差し掛
105105
106106:::tip[ ` console.log ` 関数]
107107
108- デバッガを使わずに、 ` console.log ` 関数を使ってデバッグすることもできます。 ` console.log ` 関数は、ブラウザの開発者ツールの ` Console ` に値を出力する関数です 。
109- 以下のプログラムは ` x ` と ` y ` の和を出力するプログラムですが、 ` console.log ` 関数を使ってプログラムの実行中に値の変化を確認したり、エラーが発生した際に原因を特定することができます 。
108+ ` console.log ` 関数は、メッセージをブラウザの開発者ツールの ` Console ` に出力します 。
109+ ` console.log ` 関数を使ってプログラムの実行中に値の変化を確認したり、問題が発生した時に原因を特定したりすることができます 。
110110
111111``` javascript
112112const x = 5 ;
113113const y = 10 ;
114114const sum = x + y;
115- console .log (" x + y = " , sum);
115+ console .log (" x + y は、 " , sum);
116116```
117117
118118:::
Original file line number Diff line number Diff line change 11class Car {
2- weight_tons = 1 ;
2+ weightInTons = 1 ;
33 cost ;
44}
55
66const prius = new Car ( ) ;
77prius . cost = 2600000 ;
88
9- document . write ( `重さは${ prius . weight_tons } tで、値段は${ prius . cost } 円です。` ) ;
9+ document . write ( `重さは${ prius . weightInTons } tで、値段は${ prius . cost } 円です。` ) ;
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ const now = new Date();
44const remainingHours = 23 - now . getHours ( ) ;
55const remainingMinutes = 59 - now . getMinutes ( ) ;
66const remainingSeconds = 60 - now . getSeconds ( ) ;
7- countdownBox . textContent = `今日は残り${ remainingHours } 時間 ${ remainingMinutes } 分 ${ remainingSeconds } 秒です。` ;
7+ countdownBox . textContent = `今日は残り${ remainingHours } 時間${ remainingMinutes } 分${ remainingSeconds } 秒です。` ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ document.write(emptyFunction()); // 値を返さない関数の戻り値は unde
6262
6363### 課題
6464
65- ` weight_tons ` と ` cost ` をプロパティとして持ち、 ` weight_tons ` のデフォルト値が ` 1 ` であるクラス ` Car ` を作成し、 ` cost ` に好きな値を代入してみましょう。
65+ ` weightInTons ` と ` cost ` をプロパティとして持ち、 ` weightInTons ` のデフォルト値が ` 1 ` であるクラス ` Car ` を作成し、 ` cost ` に好きな値を代入してみましょう。
6666
6767<ViewSource url = { import .meta .url } path = " _samples/car-class" />
6868
@@ -384,10 +384,6 @@ document.write(false.toString()); // false
384384
385385### ` Date ` クラス
386386
387- 上で説明したように、JavaScript では開発者が定義しなくても最初から使用可能な<Term >クラス</Term >が用意されています。
388-
389- [ ` Date ` クラス] ( https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Date ) は、JavaScript に標準で用意されている、日付や時刻を扱うための<Term >クラス</Term >です。
390-
391387ドキュメントを読み、[ ` Date ` クラス] ( https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Date ) を使って、その日の残り時間を表示してみましょう。
392388
393389例:
@@ -415,7 +411,7 @@ const now = new Date();
415411const remainingHours = 23 - now .getHours ();
416412const remainingMinutes = 59 - now .getMinutes ();
417413const remainingSeconds = 60 - now .getSeconds ();
418- countdownBox .textContent = ` 今日は残り${ remainingHours} 時間 ${ remainingMinutes} 分 ${ remainingSeconds} 秒です。` ;
414+ countdownBox .textContent = ` 今日は残り${ remainingHours} 時間${ remainingMinutes} 分${ remainingSeconds} 秒です。` ;
419415```
420416
421417<ViewSource url = { import .meta .url } path = " _samples/count-down" />
Original file line number Diff line number Diff line change 1111 < button > ログイン</ button >
1212 </ form >
1313 < p > {message}</ p >
14- < a href ="/resister "> 新規登録</ a >
14+ < a href ="/register "> 新規登録</ a >
1515 </ body >
1616</ html >
Original file line number Diff line number Diff line change 55 < title > profile</ title >
66 </ head >
77 < body >
8- < form method ="post " action ="/resistered ">
8+ < form method ="post " action ="/registered ">
99 < div >
1010 ユーザー名
1111 < input name ="username " />
You can’t perform that action at this time.
0 commit comments