JavaScript Operators Quiz 1. What is the result of 3 + '2' in JavaScript? A. 5 B. 32 C. NaN D. Undefined String concatenation occurs because one operand is a string. 2. What is the result of '5' - 2? A. '3' B. 5 C. 3 D. NaN The minus operator converts strings to numbers (5 - 2 = 3). 3. Which operator checks both value and type? A. == B. equals() C. === D. != === performs strict comparison (value + type). 4. What is the result of 0 == false? A. true B. false C. 0 D. Error Loose equality converts both sides before comparison. 5. What is the result of 0 === false? A. true B. false C. 0 D. Error Strict equality does not perform type conversion. 6. What does typeof return for an array? A. array B. object C. list D. collection Arrays are objects in JavaScript; typeof returns 'object'. 7. What is 2 ** 3? A. 6 B. 4 C. 8 D. 9 Exponentiation operator computes 2 * 2 * 2 = 8. 8. What is '10' / '2'? A. 5 B. '5' C. NaN D. undefined Division converts strings to numbers. 9. Which operator is optional chaining? A. ?? B. ?. C. :: D. --? Optional chaining avoids errors when accessing null/undefined values. 10. What is typeof undefined? A. 'null' B. 'object' C. 'undefined' D. 'void' typeof undefined returns the string 'undefined'. 11. What does the nullish coalescing operator (??) return? A. First truthy value B. First defined value C. Always left operand D. Always right operand ?? returns right side only if left is null or undefined. 12. What is the result of true + true? A. 1 B. 2 C. true D. NaN true converts to 1; 1 + 1 = 2. 13. What is typeof NaN? A. number B. NaN C. undefined D. object NaN is classified as a number in JavaScript. 14. What is the result of '4' * '2'? A. 42 B. '8' C. NaN D. 8 The * operator converts both strings to numbers. 15. What does !!value convert to? A. integer B. boolean C. string D. undefined !! forces conversion to a boolean value. 16. Which operator has the highest precedence? A. == B. && C. * D. || Multiplication has higher precedence than comparison and logical operators. 17. What is [] == '' ? A. true B. false C. Error D. undefined [] converts to an empty string ('') when coerced. 18. What is the result of [] === []? A. true B. false C. Error D. undefined Different array instances are never strictly equal. 19. What does typeof return for functions? A. 'object' B. 'function' C. 'callable' D. 'method' typeof returns 'function' for all functions. 20. Which operator assigns only if the left side is null or undefined? A. = B. ??= C. &&= D. ||= ??= assigns only when the left side is nullish. 21. What is +true? A. true B. 1 C. NaN D. undefined Unary + converts true to number 1. 22. What is +'7'? A. 7 B. '7' C. NaN D. undefined Unary + converts numeric strings into numbers. 23. What is 1 < 2 < 0? A. true B. false C. 1 D. undefined 1 < 2 is true u2192 true becomes 1 u2192 1 < 0 is false. 24. What is typeof null? A. null B. object C. undefined D. primitive typeof null returns 'object' due to legacy behavior. 25. What is [] + {}? A. '[object Object]' B. {} C. [] D. NaN [] converts to '' and {} converts to '[object Object]' when concatenated. Submit