Operators Interview Questions

    Question 1: Arithmetic Operator Precedence

    What is the result of 10 + 5 * 2 in JavaScript?

    Question 2: Comparison with Equality

    What is the result of 5 == "5" in JavaScript?

    Question 3: Strict Equality Operator

    What is the result of 5 === "5" in JavaScript?

    Question 4: Logical AND

    What is the result of true && false?

    Question 5: Logical OR with Truthy Values

    What is the result of 0 || "Hello" in JavaScript?

    Question 6: Assignment with Addition

    If let a = 5; a += 3; then what is the value of a?

    Question 7: Ternary Operator

    What is the result of let x = 10; let result = (x > 5) ? "Big" : "Small";?

    Question 8: JS Modulus Operator

    What is the result of 17 % 5 in JavaScript?

    Question 9: Unary Increment

    What is the result of:

    let a = 5; let b = ++a;

    Question 10: Exponentiation Operator

    What is the result of 2 ** 3 in JavaScript?