LoginSignup
1
0

More than 3 years have passed since last update.

条件分岐

Last updated at Posted at 2021-04-03

if文

if (条件式){
処理内容1 //条件式を満たす場合にのみ実行する
}
else{
処理内容2 //条件式を満たさない場合にのみ実行される
}
const score = 70;
if (60 > score ){
    console.log ("不合格");
} else if (60 <= score && score < 80){
    console.log ("おしい!");
} else if (80 <= score){
    console.log("合格");
}

論理演算子

  • && …かつ
  • || …または
  • ! …〜でない(否定)
1
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
1
0