JavaScript ARITHMETIC OPERATORS in 8 minutes! ➕

7 Views
Published
00:00:00 arithmetic operators
00:03:21 augmented assignment operators
00:04:54 increment/decrement operators
00:05:23 operator precedence
00:07:51 conclusion

// arithmetic operators = operands (values, variables, etc.)
// operators (+ - * /)
// ex. 11 = x + 5;

let students = 30;

//students = students + 1;
//students = students - 1;
//students = students * 2;
//students = students / 2;
//students = students ** 2;
//let extraStudents = students % 3;

console.log(students);

//students += 1;
//students -= 1;
//students *= 2;
//students /= 2;
//students **= 2;
//students %= 2;

//students++;
//students--;

/*
operator precedence
1. parenthesis ()
2. exponents
3. multiplication & division & modulo
4. addition & subtraction
*/
Category
Bro Code
Tags
javascript, javascript tutorial, javascript full course
Be the first to comment