operators

Operators in JavaScript

Operators in JavaScript

Operators are symbols that allow us to perform operations on variables and values.

Types of Operators

Example: Arithmetic Operators

      
        let x = 5;
        let y = 3;
        console.log(x + y); // 8
        console.log(x * y); // 15
      
    

Activity

Try It Yourself!

Use different operators with x = 10 and y = 2 to see the results.

Quiz

Quick Quiz

  1. What operator would you use to add two numbers?
  2. Which operator is used for strict equality?
  3. What does the && operator represent?

Answers: +; ===; logical AND.