0% found this document useful (0 votes)
367 views2 pages

javascript_interview_questions

The document contains 100 JavaScript interview questions and solutions, starting with basic concepts such as data types and variable declarations. It explains that JavaScript has 8 data types and distinguishes between `var`, `let`, and `const` in terms of scope and reassignment. Additional questions and answers are included in the document.

Uploaded by

exmusicworld
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)
367 views2 pages

javascript_interview_questions

The document contains 100 JavaScript interview questions and solutions, starting with basic concepts such as data types and variable declarations. It explains that JavaScript has 8 data types and distinguishes between `var`, `let`, and `const` in terms of scope and reassignment. Additional questions and answers are included in the document.

Uploaded by

exmusicworld
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
You are on page 1/ 2

100 JavaScript Interview Questions and Solutions

## 1. Basic JavaScript Questions

### 1.1 What are the different data types in JavaScript?


Explanation: JavaScript has 8 basic data types: Number, String,
Boolean, Undefined, Null, Object, Symbol, and BigInt.

Code Example:
const types = [
typeof 42, // "number"
typeof "Hello", // "string"
typeof true, // "boolean"
typeof undefined, // "undefined"
typeof null, // "object"
typeof Symbol("symbol"), // "symbol"
typeof {}, // "object"
typeof [], // "object"
typeof function(){} // "function"
];
console.log(types);
...

### 1.2 What is the difference between `var`, `let`, and `const`?
Explanation: `var` is function-scoped, `let` and `const` are
block-scoped. `const` cannot be reassigned.
Code Example:
var a = 10; // Function-scoped, can be re-declared
let b = 20; // Block-scoped, cannot be re-declared in same scope
const c = 30; // Block-scoped, cannot be re-assigned

... (other questions and answers will follow in the PDF)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy