a=0;
b=undefind;
c=null;
d=1;
const result = a || b || c || d;
console.log('result:' + result);
実行結果
result:1
注意
ifと同じで
0はないものとして判定される
Go to list of users who liked
More than 3 years have passed since last update.
a=0;
b=undefind;
c=null;
d=1;
const result = a || b || c || d;
console.log('result:' + result);
実行結果
result:1
注意
ifと同じで
0はないものとして判定される
Register as a new user and use Qiita more conveniently
Go to list of users who liked