Web Technology
primer-original-v2easyJavaScriptOperatorsType Coercionprimer-original-v2

What is the difference between == and === in JavaScript?

Answer options

A
== compares values only; === compares values and types
B
== is for numbers; === is for strings
C
=== performs type coercion; == does not
D
They are identical in behavior

Correct answer: == compares values only; === compares values and types

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Web Technology, understanding the underlying mechanics of JavaScript is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Web Technology questions

Practice more Web Technology questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.