Javascript
JavaScript Fundamentals -- Logical and Comparison Operators

Logical Operators -- Nullish Coalescing Exercise

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

For this exercise, create a JavaScript file and an HTML file on your machine. Import the .js file into the .html file, and then open the HTML file in your browser. You can then see the output in the browser's console. Command + shift + j on macOS or control + shift + j on a Windows computer will open the browser console.

For this exercise, determine the output for the following statements:

// 1. 5 ?? 100

// 2. 0 ?? null

// 3. null ?? 5

// 4. null ?? undefined
 

I finished! On to the next chapter