Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 902 Bytes

File metadata and controls

34 lines (21 loc) · 902 Bytes

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"

What's the result of OR?

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 );