If Statements - Week 05


Welcome to week 5 of Intro to Web Dev!

Now you know how to use JavaScript, which lets you make your content interactive. This week you’re learning about if statements, which let you make decisions in your code.

Work through the activities in this page to complete the week!


If Statements

First, watch this video and read through the tutorial:


Quiz

  1. In your own words, what is a boolean?
  2. Please give one example of a boolean operator, and explain what it does.
  3. In your own words, what is an if statement? When might you use one?
  4. What is the difference between an if statement, an else if statement, and an else statement?
  5. What is truthiness in JavaScript? What’s an example of a “truthy” value?

Project

Now you’ve seen the fundamentals of if statements in JavaScript.

To practice that, modify the files in the week-05-if-statements directory of your project repo.


Checklist

  1. Learn about if statements
  2. Follow the directions in the week-05-if-statements directory of your project repo
  3. Push those changes to GitHub and confirm you can see them in your GitHub Pages site
  4. Get ready to present your work. Make sure your camera and microphone work!