Learn Creating Variables
    1 Variable Names
    2 Variable Values
  • 1 Variable Names
  • 3 let and const Diffenrences
    • We use const to declare variables whose values are not supposed to change. const is short for "constant".
    • However, we can update let variables with the assign = operator.
    • To make it obvious that a variable is of type const and shouldn't change, we can optionally name it with uppercase letters. Create an uppercase birthday constant. const BIRTHDAY = "25/02/1882";
      We cannot use camelCase if we use this uppercase standard, so we use an uppercase snake_case to name variables with more than one word. Create an uppercase "speed of light" const using snake_case.
      What's the optional standard to make sure constants don't change their values? uppercase
      What should we use as a default? const
    4 Console
    With the special instruction console.log(), we tell the computer to display a value in an area called the console.



Learn Using Variables
add string values together
We call adding together string values an expression because it creates a single string value. Add the expression between the parentheses of console.log().
Since expressions become values, we can give them to variables just like values. Store the expression "Posts:" + "13" in the variable label and display it in the console.

Learn Using True and False
We can create expressions with numbers, too. We add numbers together with the + sign and subtract them from each other with the - sign. Display 6 in the console by setting numberOfLikes to 5 + 1. script.js
When we store numbers in variables, we can use the variables for calculations, too. Add 1 to the numberOfSteps variable before displaying it in the console.

Outside myFunction() carName is undefined.

There's a special value that's neither a string nor a number: true. There are no quotes around it, and it's not a numeric value.
What's a good use for the values true and false? 1 Showing if a feature is switched on or off

Learn Checking Number Equality
  • We learned how to create and store values, but how do we compare them?
  • We need to compare numbers in situations like checking a user's entered PIN matches their saved PIN.
  • const enteredPin = 5448;
    const expectedPin = 5440;

    To compare if two numbers are the same, we use the equality operator, ===.



    When checking if a player's number of lives remaining is exactly 5

    To check if a number isn't equal to another number, we use the inequality operator, !==.

    Eg: console.log(10!==11)

    We can store the result of a comparison with the inequality operator in a variable. Save the comparison between 1 and 2 into the variable result.

    const result = 1 !== 2;

Practice JavaScript Basics
Supercharge JavaScript Basics
Coding challenge Recreate the code output without additional guidance
Types and Comparisons 0/7
Comparing Numbers

We can use comparisons to check if a number is less than or greater than another number.

What do we call the > sign? greater than

Learn Comparing Strings 1/2 Learn
Learn Discovering Types
Learn Logical Operators The AND operator && returns true only if all the conditions are true. img
Practice Types and Comparisons
Supercharge Types and Comparisons
Conditionals 0/7
Using Conditions
If exercise 4
Incorporate If and Else
exercise 7
Loops 0/12
Arrays 0/7
Functions 0/10
Objects 0/6
Applied Functions 0/10
ES6 0/10
Array Operations 0/6
Dynamic Webpages 0/11
The Document Object Model 0/7
JavaScript Events 0/7
Synchrony and Asynchrony in JS 0/6
JavaScript Classes 0/11
Modules, Libraries, and Node