DEV Community

Cover image for Popular JavaScript Interview Questions
Hidayt Rahman
Hidayt Rahman

Posted on • Edited on

2 1

Popular JavaScript Interview Questions

Basic Questions

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 R

Popular Questions

  • What is closure?
  • What is hoisting?
  • What is Higher Order Function?
  • What is Pure Function? A
  • 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
  • Difference between Promise vs Async Await A

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 A2
  • 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 :)

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video