scrimba
Introduction to JavaScript
Challenge: If / else / elseif
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

Challenge: If / else / elseif
AboutCommentsNotes
Challenge: If / else / elseif
Expand for more info
index.js
run
preview
console
// Challenge 1: User Age

/*
1. Our business wants to keep track of what age range a user falls into.
2. If they are 12 or younger log 'child'.
3. If not a child but the user's age is under 20 log 'teenager'.
4. If neither log 'adult'.
*/

const age = 18;

// Challenge 2: Practice and or Operators

/*
1. Look at the examples below and see if you can guess the
*/

// console.log(10 === 10 && 5 < 4);

// console.log(10 === 10 || 5 < 4);

// console.log((5 >= 5 || 4 > 4) && 3 + 2 === 5);
Console
/index.html
-4:15