├── README.md
├── a-Intro
├── 1-Intro.md
├── 2-StrictMode.md
├── 3-DOM-BOM.md
├── 4-Window-Document-object.md
├── 5-Js-Engine.md
├── 6-Code-Execution.md
├── 7-Event-Loop.md
└── 8-Questions.md
├── b-DataTypes
├── 1-Data-Types.md
├── 2-Operators.md
├── 3-Coercion.md
├── 4-Error-Types.md
└── 5-Questions.md
├── c-Scope
├── 1-Scope.md
├── 2-Shadowing.md
└── 3-Questions.md
├── d-Hoisting
├── 1-Hoisting.md
├── 2-Var-Let-Const.md
└── 3-Questions.md
├── e-Functions
├── 1-Function.md
├── 2-Closures.md
├── 3-Currying.md
└── 4-Questions.md
├── f-Objects
├── 1-Object-Definations.md
├── 2-Object-Properties.md
├── 3-Object-Methods.md
├── 4-Object-Display.md
├── 5-Getter-Setter.md
├── 6-Constructor-Function.md
├── 7-Prototype.md
└── 8-Prototype-Chaining.md
├── g-Classes
├── 1-Classes.md
├── 2-Getter-Setter.md
├── 3-Inheritance.md
├── 4-Static-Methods.md
└── 5-Private-Methods.md
├── h-OOPS
└── 1-OOP.md
├── i-AdvanceFunctions
├── Call-Apply-Bind.md
└── Polyfills.md
├── j-ArrayMethods
├── HOF.md
└── Polyfills.md
├── k-StringMerhods
└── index.md
├── l-Promises
└── index.md
├── m-AsyncAwait
└── index.md
├── n-Generators-Iterations
└── index.md
├── o-Collections
└── index.md
├── p-Browser
├── BOM
│ ├── o-setTimeout
│ │ └── index.md
│ ├── s-EventPropagation
│ │ └── index.md
│ ├── t-Storage
│ │ └── index.md
│ └── xcvcv.md
├── DOM
│ └── xcvcv.md
└── Web-APIs
│ └── xcvcv.md
├── q-ECMAScript
└── xcvcv.md
├── r-Optimisation
├── q-Debouncing
│ └── index.md
└── r-Throttling
│ └── index.md
├── x-ErrorHandling
└── index.md
├── y-Debugging
└── index.md
└── z-ImportantQuestions
├── 1-TheoryBased.md
└── 2-OutputBased.md
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | # JavaScript Interview Questions & Answers
5 |
6 | - Click :star: if you like the project and follow [@PiyushAgrawal](https://www.linkedin.com/in/piyush-agrawal-me/) for more updates.
7 | - From basic to advanced: Test how well you know JavaScript, refresh your knowledge a bit, or prepare for your coding interview. I update this repo regularly with new questions.
8 | - A complete JavaScript interview handbook/series containing all the topics from basic level to advance. This Series consists of 45+ important topics with related questions and answers.
9 | ---
10 |
11 | ### Topics covered in the series
12 |
13 | | No. | Topic |
14 | | --- | -------------------------------- |
15 | | 1 | Introduction to Javascript |
16 | | 2 | Advantages of JS |
17 | | 3 | Disadvantages of JS |
18 | | 4 | Client and Server Javascript |
19 | | 5 | Strict mode in JS |
20 | | 6 | DOM and BOM |
21 | | 7 | Window and Document Object |
22 | | 8 | JS Engine |
23 | | 9 | Code Execution in JS |
24 | | 10 | Event Loop |
25 | | 11 | Data Types |
26 | | 12 | Operators |
27 | | 13 | Coercion and Type conversion |
28 | | 14 | Types of Errors |
29 | | 15 | Scope |
30 | | 16 | Shadowing |
31 | | 17 | Hoisting |
32 | | 18 | VAR vs LET vs CONST |
33 | | 19 | Functions |
34 | | 20 | Parameters vs Arguments |
35 | | 21 | Spread vs Rest Operator |
36 | | 22 | Higher order functions |
37 | | 23 | IIFE |
38 | | 24 | Closure |
39 | | 25 | Currying |
40 | | 26 | Infinite Currying |
41 | | 27 | Callbacks |
42 | | 28 | This Keyword |
43 | | 29 | Objects |
44 | | 30 | Delete Keyword |
45 | | 31 | Constructor Function |
46 | | 32 | Getter Setter |
47 | | 33 | Prototype |
48 | | 34 | Prototype Chaining |
49 | | 35 | Classes |
50 | | 36 | Inheritance |
51 | | 37 | Static Keyword |
52 | | 38 | Private Methods |
53 | | 39 | OOPS |
54 | | 41 | Encapsulation |
55 | | 42 | Abstraction |
56 | | 43 | Polymorphism |
57 | | 44 | Polyfills |
58 | | 45 | Deep copy and shallow copy |
59 | | 46 | Promises |
60 | | 47 | Async Await |
61 | | 48 | Event Propagation |
62 | | 49 | SetTimeout and SetInterval |
63 | | 50 | SetTimeout and SetInterval |
64 | | 51 | Cookies and Local storage |
65 | | 52 | Debouncing |
66 | | 53 | Throttling |
67 | | 54 | Set , Map , weakSet , weakMap |
68 | | 55 | Debugger |
69 | | 56 | Debugger |
70 | | 57 | Important output based questions |
71 | | 58 | Important theory questions |
72 |
73 | ---
74 |
75 | **[⬆ Back to Top](#topics-covered-in-the-series)**
76 |
77 | ## Disclaimer | Note :
78 |
79 | The topics and questions provided in this repository are the summary of all the frequently asked questions across numerous companies. We cannot guarantee that these questions will actually be asked during your interview process, nor should you focus on memorizing all of them.
80 |
81 | Good luck with your interview 😊
82 |
83 | ---
84 |
--------------------------------------------------------------------------------
/a-Intro/1-Intro.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | ## What is Javascript?
4 |
5 | `JavaScript` is a lightweight, cross-platform, `single-threaded`, and interpreted compiled programming language which is also known as the scripting language for webpages. It is well-known for the development of web pages, and many non-browser environments also use it. JavaScript is `a weakly typed language` (dynamically typed). JavaScript can be used for Client-side developments as well as Server-side developments. JavaScript is both an imperative and declarative type of language. JavaScript contains a standard library of objects, like Array, Date, and Math, and a core set of language elements like operators, control structures, and statements.
6 |
7 | - JavaScript, created by `Brendan Eich` in `1995`, is one of the most widely used web development languages.
8 | - It was designed to build dynamic web pages at first. A script is a JS program that may be added to the HTML of any web page. When the page loads, these scripts execute automatically.
9 | - A language that was originally designed to build dynamic web pages may now be run on the server and on almost any device that has the JavaScript Engine installed.
10 | - After HTML and CSS, JavaScript is the third biggest web technology.
11 | - JavaScript is a scripting language that may be used to construct online and mobile apps, web servers, games, and more.
12 | - JavaScript is an object-oriented programming language that is used to generate websites and applications. It was created with the intention of being used in a browser.
13 | -Even today, the server-side version of JavaScript known as Node.js may be used to create online and mobile apps, real-time applications, online streaming applications, and videogames. Javascript frameworks, often known as inbuilt libraries, may be used to construct desktop and mobile programs.
14 |
15 | ## JavaScript is Used for
16 |
17 | - `Creating Interactive Websites`: JavaScript is used to make web pages dynamic and interactive. It means using JavaScript, we can change the web page content and styles dynamically.
18 | - `Building Applications`: JavaScript is used to make web and mobile applications. To build web and mobile apps, we can use the most popular JavaScript frameworks like – ReactJS, React Native, Node.js etc.
19 | - `Web Servers`: We can make robust server applications using JavaScript. To be precise we use JavaScript frameworks like Node.js and Express.js to build these servers.
20 | - `Game Development`: JavaSCript can be used to design Browser games. In JavaScript, lots of game engines are available that provide frameworks for building games.
21 |
22 | ## Advantages of JavaScript
23 |
24 | - `Less server interaction` − You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.
25 | - `Immediate feedback to the visitors` − They don't have to wait for a page reload to see if they have forgotten to enter something.
26 | - `Increased interactivity` − You can create interfaces that react when the user hovers over them with a mouse or activates them via the keyboard.
27 | - `Richer interfaces` − You can use JavaScript to include such items as drag-and-drop components and sliders to give a Rich Interface to your site visitors.
28 |
29 | ## Limitations of JavaScript
30 | - `Security risks`: JavaScript can be used to fetch data using AJAX or by manipulating tags that load data such as `,