JavaScript Interview Questions

Basic, Types
  • ▪︎What Are the Primitive Types in JavaScript? How To Check the Type of a Variable?
  • ▪︎What Is the Difference Between ==, === and Object.is in JavaScript?
  • ▪︎What Is the Difference Between null, undefined and undeclared in JavaScript?
  • ▪︎What is the Difference Between Map and Object in JavaScript, and Why Do We Need Map?
  • ▪︎What Is the Difference Between Set, Map, WeakSet, and WeakMap in JavaScript?
  • ▪︎What Will 0.1 + 0.2 Be in JavaScript? Why?
  • ▪︎What Is the Purpose of "use strict" in JavaScript and What Are the Benefits of Using It?
Variable, Scope, Closure
  • ▪︎What Is the Difference Between var, let and const in JavaScript?
  • ▪︎What Is the Scope and Scope Chain of JavaScript?
  • ▪︎What Is JavaScript Closure?
  • ▪︎Explain what hoisting is in JavaScript
Array
  • ▪︎Different Ways of Iterating an Array in JavaScript? What Is the Difference Between Them?
  • ▪︎In JavaScript Built-In Sort, When You Pass in (a, b) => b – a, How Will It Sort the Array? Why?’
Function
  • ▪︎What Is an Arrow Function in JavaScript? How Is It Different From a Regular Function?
  • ▪︎What is an IIFE (Immediately Invoked Function Expression) in JavaScript? What are the Pros and Cons?
  • ▪︎What Is a Higher-Order Function in JavaScript?
Objects & Prototypes
  • ▪︎The Most Common JavaScript Prototype Interview Questions and Answers (prototype, prototypal inheritance, prototype chain)
  • ▪︎What Is "this" in JavaScript?
  • ▪︎Explaining the Concept of a Class in ES6 and the Distinction Between a Function Constructor
Event Loop、Promise、Async/Await
  • ▪︎What Is JavaScript Promise? And How To Use It?
  • ▪︎What Is an Event Loop in JavaScript?
  • ▪︎The Most Common JavaScript Event Loop Interview Questions