Loading lesson path
= assigns values
+ adds values
> compares values
( = ) assigns a value to a variable:
Assignment Examples let x = 10;
// Assign the value 5 to x let x = 5;
// Assign the value 2 to y let y = 2;Formula
// Assign the value x + y to z:let z = x + y;( + ) adds numbers:
Adding let x = 5;
let y = 2;
let z = x + y;( * ) multiplies numbers:
Multiplying let x = 5;
let y = 2;
let z = x * y;There are different types of JavaScript operators:
And more ...
Arithmetic Operators are used to perform arithmetic on numbers: