scrimba
JS Deep Dive
Types & Conditionals
Challenge: Types
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
Challenge: Types
Expand for more info
index.js
run
preview
console
// Challenge 1:
// What will the following console logs display? (they're all true and false)

console.log("Challenge 1:")
console.log(!undefined);
console.log(Boolean(NaN));
console.log(false === false);
console.log(5 === "5");
console.log("Hello" == "hello");

// Challenge 2:
// What will the following console logs display? (they're all true and false)
console.log("Challenge 2:")
console.log(Boolean(0));
console.log(Boolean("0"));
console.log(Boolean(""));
console.log(!null);
console.log(!!"hello");

// Challenge 3:
// List all the falsy values in JavaScript

Console
/index.html
-3:42