🎯 Learning Objectives

By the end of this class, students will be able to:

🧩 1. What Are Operators?

Operators are symbols that perform actions on values (operands).

For example:

let a = 10;
let b = 5;
let sum = a + b;
console.log(sum); // 15

Here:

⚙️ 2. Types of Operators

Category Example Symbols Purpose
Arithmetic +, -, *, /, %, ** Perform math operations
Assignment =, +=, -=, *=, /= Assign or update values
Comparison ==, ===, !=, !==, >, <, >=, <= Compare two values
Logical &&, `
String + Combine strings
Increment / Decrement ++, -- Increase or decrease values
Ternary condition ? true : false Short form of if-else

➕ 3. Arithmetic Operators

These perform basic math:

let a = 10;
let b = 3;

console.log(a + b); // 13
console.log(a - b); // 7
console.log(a * b); // 30
console.log(a / b); // 3.333...
console.log(a % b); // 1 (remainder)
console.log(a ** b); // 1000 (10³)

🧮 4. Assignment Operators