1/18
JAVASCRIPT
INTERVIEW
QUESTIONS
1. What is JavaScript?
JavaScript is a high-level, interpreted programming language
used to create interactive and dynamic web content. It is a
versatile, lightweight, and event-driven language that can run
on both the client and server sides.
2. What are the data types supported by JavaScript?
JavaScript supports the following data types:
Primitive Types: String, Number, BigInt, Boolean,
Undefined, Null, Symbol.
Non-Primitive Types: Object (including arrays, functions).
3. What is the difference between let, const, and var?
var: Function-scoped, allows redeclaration, hoisted with
undefined.
let: Block-scoped, no redeclaration, hoisted but not
initialized.
const: Block-scoped, no redeclaration, and must be
initialized during declaration.
4. Explain how == and === differ.
== checks for value equality with type coercion.
=== checks for strict equality without type coercion