Popular JavaScript Interview Questions
Tags: javascript, interviewquestions, webdev, functional
Published: 2021-10-18 07:08:54

### Basic Questions

- What is JavaScript
- Is JavaScript a multithreaded language? [A](https://dev.to/bbarbour/if-javascript-is-single-threaded-how-is-it-asynchronous-56gd)
- Is JavaScript asynchronous and multithreaded?
- Why JavaScript?
- What is scope? 
[A1](https://www.digitalocean.com/community/tutorials/understanding-scope-in-javascript)
- [Scope and Scope chain in Javascript](https://dev.to/tailine/scope-and-scope-chain-in-javascript-3478)
- [What are data types in JavaScript?](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures)
- [Pass By Value And Pass By Reference In JavaScript](https://medium.com/nodesimplified/javascript-pass-by-value-and-pass-by-reference-in-javascript-fcf10305aa9c)


### DOM Questions

- How to select all element using class?
- What `querySelector()` returns?
- How to find an element in the tree?
- How to select top most parent element?
- How to select next element?
- How to remove element?
- How to add attribute?
- How to select a data attribute?
- How to set value on the data attribute?
- How to apply style on element?
- How to wait until an element exists? [A](https://stackoverflow.com/questions/5525071/how-to-wait-until-an-element-exists) [R](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)


### Popular Questions

- What is `closure`?
- What is `hoisting`?
- What is `Higher Order Function`?
- What is `Pure Function`? [A](https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-pure-function-d1c076bec976)
- What is `Recursion`?
- Where we should use Recursion?
- What is `reduce` function?
- What is `map` function?
- What is `filter` function?
- Difference between `==` and `===`?
- What is the difference between `call`, `apply` and `bind`?
- What is the difference between `map` and `forEach`
- What is the difference between `rest parameter` and `spread operator` [A1](https://medium.com/@luke_smaki/javascript-es6-spread-operator-and-rest-parameters-b3e89d112281)
- Difference between `Promise` vs `Async Await` [A](https://www.geeksforgeeks.org/difference-between-promise-and-async-await-in-node-js/)


### Basic DS and Algo 

- Calculate the functional arguments?
- Find the largest number?
- Return the `unique numbers` from the array?
- Return the `duplicate numbers` from the array?
- Return the count of `duplicate numbers` from the array?
- Find the falsy values and return them?
- compare two `arrays` and returns true if both are same.
- compare two `objects` and return true if both are same.
- return flat array from the multi dimensional `zig-zag` array?
- Return `truthy` item from the array?
- Return `falsy` item from the array?

### Advance Questions
- What is `function Curry`?
- How and where we can use function curry?
- What is `Debounce` in JavaScript?
- What is `throttling` in JavaScript?
- Difference between throttling and `debouncing`?
- What is `event capturing` and how do we use?
- What is `event bubbling` and how do we use?
- What is `event delegation` and how do we use?
- Is JavaScript multi-thread?
- What is `Call Stack`?
- What is `Event Queue`?
- What is `Event Loop`?
- How event loop works?
- What is `temporal dead zone`? [A1](https://www.freecodecamp.org/news/what-is-the-temporal-dead-zone/) [A2](https://stackoverflow.com/questions/33198849/what-is-the-temporal-dead-zone)
- What is `Shadow DOM`?
- What is `Web Component`?
- What is the difference between `shadow` and `virtual` `DOM`?



Save this article, I will update it regularly :)