MCPcopy
hub / github.com/sudheerj/javascript-interview-questions

github.com/sudheerj/javascript-interview-questions @main sqlite

repository ↗ · DeepWiki ↗
25 symbols 42 edges 25 files 6 documented · 24%
README

JavaScript Interview Questions & Answers

Click :star:if you like the project and follow @SudheerJonna for more updates. Coding questions available here. Check DataStructures and Algorithms for DSA related questions and ECMAScript for all ES features.)


GreatFrontEnd JavaScript Interview Questions

Practice 280+ JavaScript coding interview questions in-browser. Built by ex-FAANG interviewers. No AI-generated fluff. No fake reviews. Try GreatFrontEnd → 💡

ZTM Logo

I recommend this JavaScript Projects courses and this Advanced JavaScript Course to become top 10% at JS and this coding interview bootcamp to ace your coding interview and actually get hired.

Table of Contents

No. Questions
1 What are the possible ways to create objects in JavaScript
2 What is a prototype chain
3 What is the Difference Between call, apply, and bind
4 What is JSON and its common operations
5 What is the purpose of the array slice method
6 What is the purpose of the array splice method
7 What is the difference between slice and splice
8 How do you compare Object and Map
9 What is the difference between == and === operators
10 What are lambda expressions or arrow functions
11 What is a first class function
12 What is a first order function
13 What is a higher order function
14 What is a unary function
15 What is the currying function
16 What is a pure function
17 What are the benefits of pure functions
18 What is the purpose of the let keyword
19 What is the difference between let and var
20 What is the reason to choose the name let as a keyword
21 How do you redeclare variables in a switch block without an error
22 What is the Temporal Dead Zone
23 What is an IIFE (Immediately Invoked Function Expression)
24 How do you decode or encode a URL in JavaScript?
25 What is memoization
26 What is Hoisting
27 What are classes in ES6
28 What are closures
29 What are modules
30 Why do you need modules
31 What is scope in javascript
32 What is a service worker
33 How do you manipulate DOM using a service worker
34 How do you reuse information across service worker restarts
35 What is IndexedDB
36 What is web storage
37 What is a post message
38 What is a Cookie
39 Why do you need a Cookie
40 What are the options in a cookie
41 How do you delete a cookie
42 What are the differences between cookie, local storage and session storage
43 What is the main difference between localStorage and sessionStorage
44 How do you access web storage
45 What are the methods available on session storage
46 What is a storage event and its event handler
47 Why do you need web storage
48 How do you check web storage browser support
49 How do you check web workers browser support
50 Give an example of a web worker
51 What are the restrictions of web workers on DOM
52 What is a promise
53 Why do you need a promise
54 Explain the three states of promise
55 What is a callback function
56 Why do we need callbacks
57 What is a callback hell
58 What are server-sent events
59 How do you receive server-sent event notifications
60 How do you check browser support for server-sent events
61 What are the events available for server sent events
62 What are the main rules of promise
63 What is callback in callback
64 What is promise chaining
65 What is promise.all
66 What is the purpose of the race method in promise
67 What is a strict mode in javascript
68 Why do you need strict mode
69 How do you declare strict mode
70 What is the purpose of double exclamation
71 What is the purpose of the delete operator
72 What is typeof operator
73 What is undefined property
74 What is null value
75 What is the difference between null and undefined
76 What is eval
77 What is the difference between window and document
78 How do you access history in javascript
79 How do you detect caps lock key turned on or not
80 What is isNaN
81 What are the differences between undeclared and undefined variables
82 What are global variables
83 What are the problems with global variables
84 What is NaN property
85 What is the purpose of isFinite function
86 What is an event flow
87 What is event capturing
88 What is event bubbling
89 How do you submit a form using JavaScript
90 How do you find operating system details
91 What is the difference between document load and DOMContentLoaded events
92 What is the difference between native, host and user objects
93 What are the tools or techniques used for debugging JavaScript code
94 What are the pros and cons of promises over callbacks
95 What is the difference between an attribute and a property
96 What is same-origin policy
97 What is the purpose of void 0
98 Is JavaScript a compiled or interpreted language
99 Is JavaScript a case-sensitive language
100 Is there any relation between Java and JavaScript
101 What are events
102 Who created javascript
103 What is the use of preventDefault method
104 What is the use of stopPropagation method
105 What are the steps involved in return false usage
106 What is BOM
107 What is the use of setTimeout
108 What is the use of setInterval
109 Why is JavaScript treated as Single threaded
110 What is an event delegation
111 What is ECMAScript
112 What is JSON
113 What are the syntax rules of JSON
114 What is the purpose JSON stringify
115 How do you parse JSON string
116 Why do you need JSON
117 What are PWAs
118 What is the purpose of clearTimeout method
119 What is the purpose of clearInterval method
120 How do you redirect new page in javascript
121 How do you check whether a string contains a substring
122 How do you validate an email in javascript
123 How do you get the current url with javascript
124 What are the various url properties of location object
125 How do you get query string values in javascript
126 How do you check if a key exists in an object
127 How do you loop through or enumerate javascript object
128 How do you test for an empty object
129 What is an arguments object
130 How do you make first letter of the string in an uppercase
131 What are the pros and cons of for loops
132 How do you display the current date in javascript
133 How do you compare two date objects
134 How do you check if a string starts with another string
135 How do you trim a string in javascript
136 [How do you add a key value pair in javascript](#how-do-you-add

Core symbols most depended-on inside this repo

displayUser
called by 3
coding-exercise/destructuring-defaults.js
createCounter
called by 2
coding-exercise/closure-counter.js
calcArea
called by 1
coding-exercise/class-multiple-constructors.js
Vehicle
called by 1
coding-exercise/function-without-new.js
foo
called by 1
coding-exercise/accidental-global.js
fetchData
called by 1
coding-exercise/async-await-error.js
getData
called by 1
coding-exercise/async-await-error.js
main
called by 1
coding-exercise/eventloop-order.js

Shape

Function 20
Method 3
Class 2

Languages

TypeScript100%

Modules by API surface

coding-exercise/class-multiple-constructors.js5 symbols
coding-exercise/throttle-function/throttle.js3 symbols
coding-exercise/prototype-chain.js2 symbols
coding-exercise/debounce-function/debounce.js2 symbols
coding-exercise/async-await-error.js2 symbols
coding-exercise/superArrayOfObjects/superArrayOfObjects.js1 symbols
coding-exercise/semicolon-issue.js1 symbols
coding-exercise/function-without-new.js1 symbols
coding-exercise/function-hoisted.js1 symbols
coding-exercise/function-context.js1 symbols
coding-exercise/function-arrow-context.js1 symbols
coding-exercise/eventloop-order.js1 symbols

Dependencies from manifests, versioned

github-slugger2.0.0 · 1×

For agents

$ claude mcp add javascript-interview-questions \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact