JavaScript interview questions
January 27, 2024
☕️ Support Us
Your support will help us to continue to provide quality content.👉 Buy Me a Coffee
This series compiles common JavaScript interview questions, including basics, types, variables, scope, closures, arrays, functions, objects, prototypes, and event loops
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?
- What is ECMAScript? What is it to do with JavaScript?
- 9 Key New Features of ES6 (ES2015) You Should Know
- What’s New in ES2023 (ES14)?
- Should You Use the Ternary Operator in Programming?
- 10 JavaScript Quizs to Test Your Knowledge of This Language
Variable, Scope, Closure
Array
- What array traversal methods are there in JavaScript? (for loop, for...in, for...of, forEach, map, filter, every, some)
- Will passing (a,b) => b - a in JavaScript builit-in sort a be in ascending or descending order? Why?
- How to Flatten an Array?
- How to find the average of an array in JavaScript?
- How to remove duplicates from an array?
Function
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
- When Is the Difference Between Shallow and Deep Copy in JavaScript?
- Why structuredClone is the Best Choice for Deep Copying in JavaScript?