[Go to site: main page, start]

0% found this document useful (0 votes)
1 views1 page

Chapter 1 JavaScript Interview Guide Part1

This document contains concise interview-ready answers

Uploaded by

madhu swedha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Chapter 1 JavaScript Interview Guide Part1

This document contains concise interview-ready answers

Uploaded by

madhu swedha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 1 - JavaScript Interview Guide (Part 1)

1. What is JavaScript?
JavaScript is a high-level, interpreted, single-threaded, dynamically typed programming language
used to build interactive web applications. It runs in browsers and on servers using [Link].
Real-time Example: Form validation, button clicks, dynamic UI updates.

2. What are JavaScript Data Types?


Primitive: String, Number, Boolean, Undefined, Null, BigInt, Symbol. Non-Primitive: Object
(including arrays and functions). Undefined means declared but not assigned. Null means
intentionally empty.

3. Difference between == and ===


== compares values after type coercion. === compares both value and type. Example: 5=='5' is
true, but 5==='5' is false. Prefer ===.

4. What is Hoisting?
Hoisting moves declarations to the top of their scope before execution. var is hoisted and initialized
as undefined. let and const are hoisted but remain in the Temporal Dead Zone until initialized.

5. Difference between var, let and const


var is function-scoped and allows redeclaration. let is block-scoped and allows reassignment. const
is block-scoped and cannot be reassigned after initialization. Prefer const by default, let when
reassignment is needed.

You might also like