Literals, Operators, Control Flow (if-else), Exercises / Bonus Material
In this chapter, we will look into the basics of JavaScript literals, operators, control-flow (if-else
). We will also work on several exercises including some bonus material.
- Literals
- Exercise - Literals
- Exercise - Literals Part 2
- Basic operators in JavaScript
- Exercise - Basic operators in JavaScript
- Basics of Control Flow - if, if/else statements
- Exercise - Basics of Control Flow - if statement
- Exercise - If it rains
- Exercise - Basics of Control Flow - if/else statement
- Exercise - Beach or Hike? Using if/else
- Basics of Control Flow - if/else-if/else statement
- Exercise - Basics of Control Flow - if/else-if/else statement
- Exercise - String concatenation
- Exercise - Mixing single and double quotes
- Exercise - "Escaping" characters in a string
- Exercise - Fix the bug in exchanging values of two variables
- Exercise - Exchanging values of two variables correctly
- Exercise - Alice and Bob swap money
- Exercise - Switch statement
- Exercise - Switch statement with "default" case
- Exercise - Switch statement utilizing no breaks
- Exercise - Fix the bug in this Switch statement
- Exercise - Switch statement Airlines example 1
- Exercise - Student grade score example using score range
- Exercise - Switch statement Airlines example 2 using miles range
- Exercise - Switch statement Airlines 3 - Fix the bug
- Exercise - Switch statement Airlines 4 - Fix the bug
- Exercise - Applying Boolean "not" operator multiple times