0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Javascriptまとめ 【if文】【for文】2019.12.11

Posted at

【if文】

if(条件式1) {
  条件式1がtureのとき実行される処理
} else if(条件式2){
  条件式1がfalseで、条件式2がtureのとき実行される処理
} else {
  条件式1、2がfalseのとき実行される処理
}

※条件式の()と、処理文の{}は省略不可

【for文】

for(let i = 0; i < 10; i = i + 1){
  繰り返される処理
}

※「i < 10」の部分で回数を決めている
※「i = i + 1」の部分は処理が1回繰り返されるごとに呼ばれる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?