if...else if ... else

命令 Instruction Type
Format
if (条件) 条件を満たした場合の処理 if (condition) if the processing conditions

if (条件) 条件を満たした場合の処理 else 条件を満たさなかった場合の処理 if (condition) else do if conditions do if満TASANAKATTA conditions

if (条件) if (condition)
{ (
条件を満たした場合の処理 If processing conditions
} )

if (条件) if (condition)
{ (
条件を満たした場合の処理 If processing conditions
}else{ ) else (
条件を満たさなかった場合の処理 If processing conditions満TASANAKATTA
} )
Commentary
条件を満たした場合にif()以下を実行します。 If you meet the criteria if () to run the following. else以後は、条件を満たしていない場合の処理を行います。 else after the operation, which does not meet the criteria. ifは複数入れ子にする(ネスト)ことができます。 if the multiple nested (nested) can be.
サンプルコード Sample code
n = (new Date()).getSeconds(); n = (new Date ()). getSeconds ();
if (n < 30) if (n <30)
{ (
outputs[0] = "30未満です"; outputs [0] = "30 is less than";
}else{ ) else (
outputs[0] = "30以上です"; outputs [0] = "30 is over";
} )