Skip to content
WebDev Path
Back

Week 5: JavaScript basics: values, logic and functions

Next video

Free lesson by Fireship on YouTube

About this lesson

Module:
JavaScript
Time:
about 11 hours
Video:
12 min

Learn the building blocks every program is made of.

By the end of this week you can

  • Use variables, types and operators correctly
  • Control flow with if/else and loops
  • Write small, reusable functions

Learn

  • let and const, strings, numbers, booleans
  • Comparison and logical operators
  • if/else, switch, for and while loops
  • Functions, parameters and return values

Read or watch

Practice

  1. Solve 20 small exercises (FizzBuzz, reverse a string, sum an array)
  2. Explain each solution out loud or in a comment

Build

Build a tip calculator with plain JavaScript.

Check your understanding

Score 4 out of 5 to complete this week.

  1. 1. Which keyword should you use for a value that will be reassigned?
  2. 2. What does 2 === "2" return?
  3. 3. What is the value of typeof null?
  4. 4. What does this return? ["a", "b"].length
  5. 5. What does a function return if it has no return statement?
0 of 5 answered