alert-null-2-undefined"
- <a href="alert-null-2-undefined.html" alert-null-2-undefined" /alert-null-2-undefined" alert-null-2-undefinedalert-null-2-undefined"
alert-null-2-undefined" /alert-null-2-undefined" /alert-null-2-undefined" ask/alert-null-2-undefined"k%2Falert-null-2-undefined"%2Falert-null-2-undefined"
<a href="../logical-operators.html" Logical operators
<a href="../logical-operators.html"
importance: 5
What is the code below going to output?
alert( null || 2 || undefined );
solution
The answer is 2, that’s the first truthy value.
<a href="alert-null-2-undefined.html#"
alert( null || 2 || undefined );