We want to make this open-source project available for people all around the world.
Help to translate the content of this tutorial to your language!
What will the result be?
alert( null || 2 && 3 || 4 );
The answer: 3.
3
The precedence of AND && is higher than ||, so it executes first.
&&
||
The result of 2 && 3 = 3, so the expression becomes:
2 && 3 = 3
null || 3 || 4
Now the result is the first truthy value: 3.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル