Skip to content

Commit 3b285b9

Browse files
committed
Change from let to const in answer of prime number
1 parent e1fd3ea commit 3b285b9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/1-trial-session/08-loop/_samples/is-prime-using-and/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let n = 89; //任意の整数
1+
const n = 89; //任意の整数
22

33
let isPrime = true;
44
if (n <= 1) {

docs/1-trial-session/08-loop/_samples/is-prime/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let n = 57; // 任意の整数
1+
const n = 57; // 任意の整数
22

33
let isPrime = true;
44
if (n <= 1) {

docs/1-trial-session/08-loop/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ document.write(product);
248248
変数の、最後に代入した値のみを保持する性質を利用します。
249249

250250
```javascript
251-
let n = 57; // 任意の整数
251+
const n = 57; // 任意の整数
252252

253253
let isPrime = true;
254254
if (n <= 1) {
@@ -276,7 +276,7 @@ if (isPrime) {
276276
前項で割ったあまりが0でないこととの `&&` (AND) をとることで帰納的に求めることもできます。
277277

278278
```javascript
279-
let n = 89; // 任意の整数
279+
const n = 89; // 任意の整数
280280

281281
let isPrime = true;
282282
if (n <= 1) {

0 commit comments

Comments
 (0)