Sign in to unlock

Get unlimited access to all questions and answers

checked

Get lifetime access

checked

Track progress

checked

Save time

đź‘‹

Hi! Please sign in to edit.

You will receive an email notification when your contribution is accepted.

The fastest way to prepare
for a tech interview

Check our curated list of full-stack, data structures & software architecture interview questions and answers for developers

* If it's yours original answer, you can add a link to your social media account or personal website.
JavaScript interview questions

JavaScript interview questions.

Only challenges
Topic progress: 0%
  • 1.

    What is the object type?

    premium question
    completed

    Answer:

  • 2.

    Explain arrays in JavaScript

    premium question
    completed

    Answer:

  • 3.

    What is typeof operator?

    premium question
    completed

    Answer:

  • 4.

    Explain equality in JavaScript

    premium question
    completed

    Answer:

  • 5.

    What is Scope in JavaScript?

    premium question
    completed

    Answer:

  • 6.

    Explain Values and Types in JavaScript

    premium question
    completed

    Answer:

  • 7.

    What is let keyword in JavaScript?

    premium question
    completed

    Answer:

  • 8.

    Explain the same-origin policy with regards to JavaScript.

    premium question
    completed

    Answer:

  • 9.

    What is the difference between == and ===?

    premium question
    completed

    Answer:

  • 10.

    Is there anyway to force using strict mode in Node.js?

    premium question
    completed

    Answer:

  • 11.

    Why would you use something like the load event? Does this event have disadvantages? Do you know any alternatives, and why would you use those?

    premium question
    completed

    Answer:

  • 12.

    What is strict mode?

    premium question
    completed

    Answer:

  • 13.

    What's the difference between Host objects and Native objects?

    premium question
    completed

    Answer:

  • 14.

    What language constructions do you use for iterating over object properties and array items?

    premium question
    completed

    Answer:

  • 15.

    What are some of the advantages/disadvantages of writing JavaScript code in a language that compiles to JavaScript?

    premium question
    completed

    Answer:

  • 16.

    Explain event bubbling and how one may prevent it

    premium question
    completed

    Answer:

  • 17.

    What does use strict do?

    premium question
    completed

    Answer:

  • 18.

    Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?

    premium question
    completed

    Answer:

  • 19.

    What is a Polyfill?

    premium question
    completed

    Answer:

  • 20.

    Explain Null and Undefined in JavaScript

    premium question
    completed

    Answer:

  • 21.

    What's the difference between throw Error('msg') vs throw new Error('msg')?

    premium question
    completed

    Answer:

  • 22.

    Lucky sevens

    premium question
    completed

    Answer:

  • 23.

    Simple clock angle

    premium question
    completed

    Answer:

  • 24.

    Sum of several arrays

    premium question
    completed

    Answer:

  • 25.

    Test divisors of three

    premium question
    completed

    Answer:

  • 26.

    Oddball sum

    premium question
    completed

    Answer:

  • 27.

    Sum of Array Plus One

    premium question
    completed

    Answer:

  • 28.

    String Rotation

    premium question
    completed

    Answer:

  • 29.

    Make this work

    premium question
    completed

    Answer:

  • 30.

    Given a string, reverse each word in the sentence

    premium question
    completed

    Answer:

  • 31.

    Implement enqueue and dequeue using only two stacks

    premium question
    completed

    Answer:

  • 32.

    Write a "mul" function which will properly when invoked as below syntax

    premium question
    completed

    Answer:

  • 33.

    Explain what a callback function is and provide a simple example

    premium question
    completed

    Answer:

  • 34.

    How to empty an array in JavaScript?

    premium question
    completed

    Answer:

  • 35.

    Find the missing number in O(n) time

    premium question
    completed

    Answer:

  • 36.

    Write a function that would allow you to do this?

    premium question
    completed

    Answer:

  • 37.

    Remove duplicates of an array and return an array of only unique elements

    premium question
    completed

    Answer:

  • 38.

    How to check if an object is an array or not? Provide some code.

    premium question
    completed

    Answer:

  • 39.

    How would you check if a number is an integer?

    premium question
    completed

    Answer:

  • 40.

    Two sum problem

    premium question
    completed

    Answer:

  • 41.

    Determine overlapping numbers in ranges

    premium question
    completed

    Answer:

  • 42.

    Stock maximum profit

    premium question
    completed

    Answer:

  • 43.

    Tree Level Order Print

    premium question
    completed

    Answer:

  • 44.

    Step-by-step solution for step counting using recursion

    premium question
    completed

    Answer:

  • 45.

    Implement Bubble Sort

    premium question
    completed

    Answer:

  • 46.

    What is IIFEs (Immediately Invoked Function Expressions)?

    premium question
    completed

    Answer:

  • 47.

    What is Coercion in JavaScript?

    premium question
    completed

    Answer:

  • 48.

    What is the difference between a shim and a polyfill?

    premium question
    completed

    Answer:

  • 49.

    What is the definition of a Higher-Order Function?

    premium question
    completed

    Answer:

  • 50.

    What do you think of AMD vs CommonJS?

    premium question
    completed

    Answer:

  • 51.

    Explain the differences on the usage of foo between function foo() {} and var foo = function() {}

    premium question
    completed

    Answer:

  • 52.

    What is the drawback of creating true private in JavaScript?

    premium question
    completed

    Answer:

  • 53.

    What's the difference between .call and .apply?

    premium question
    completed

    Answer:

  • 54.

    What is the preferred syntax for defining enums in JavaScript?

    premium question
    completed

    Answer:

  • 55.

    Describe Closure concept in JavaScript as best as you could

    premium question
    completed

    Answer:

  • 56.

    Could you explain the difference between ES5 and ES6

    premium question
    completed

    Answer:

  • 57.

    When should we use generators in ES6?

    premium question
    completed

    Answer:

  • 58.

    Explain Function.prototype.bind.

    premium question
    completed

    Answer:

  • 59.

    What are the benefits of using spread syntax in ES6 and how is it different from rest syntax?

    premium question
    completed

    Answer:

  • 60.

    When should I use Arrow Functions in ES6?

    premium question
    completed

    Answer:

  • 61.

    Explain the difference between undefined and not defined in JavaScript

    premium question
    completed

    Answer:

  • 62.

    What are the advantages and disadvantages of using use strict?

    premium question
    completed

    Answer:

  • 63.

    What is Currying?

    premium question
    completed

    Answer:

  • 64.

    What are the differences between ES6 class and ES5 function constructors?

    premium question
    completed

    Answer:

  • 65.

    Why should we use ES6 classes?

    premium question
    completed

    Answer:

  • 66.

    Explain the difference between Object.freeze() vs const

    premium question
    completed

    Answer:

  • 67.

    How to compare two objects in JavaScript?

    premium question
    completed

    Answer:

  • 68.

    What will be the output of the following code?

    premium question
    completed

    Answer:

  • 69.

    What is a closure, and how/why would you use one?

    premium question
    completed

    Answer:

  • 70.

    What will be the output of the following code?

    premium question
    completed

    Answer:

  • 71.

    What's a typical use case for anonymous functions?

    premium question
    completed

    Answer:

  • 72.

    Suggest one simple way of removing duplicates from an array using ES6

    premium question
    completed

    Answer:

  • 73.

    What is generator in JS?

    premium question
    completed

    Answer:

  • 74.

    What is the difference between document load event and document DOMContentLoaded event?

    premium question
    completed

    Answer:

  • 75.

    What's the difference between using let and var to declare a variable in ES6?

    premium question
    completed

    Answer:

  • 76.

    What is the motivation for bringing Symbol to ES6?

    premium question
    completed

    Answer:

  • 77.

    Why is extending built-in JavaScript objects not a good idea?

    premium question
    completed

    Answer:

  • 78.

    What is the difference between Anonymous and Named functions?

    premium question
    completed

    Answer:

  • 79.

    Provide some examples of non-bulean value coercion to a boolean one

    premium question
    completed

    Answer:

  • 80.

    Given an array of integers, find the largest difference between two elements such that the element of lesser value must come before the greater element

    premium question
    completed

    Answer:

  • 81.

    What will the following code output?

    premium question
    completed

    Answer:

  • 82.

    Write a function that would allow you to do this

    premium question
    completed

    Answer:

  • 83.

    Given an array of integers, find the largest product yielded from three of the integers

    premium question
    completed

    Answer:

  • 84.

    What will be the output of the following code?

    premium question
    completed

    Answer:

  • 85.

    Check if a given string is a palindrome. Case sensitivity should be taken into account.

    premium question
    completed

    Answer:

  • 86.

    Find the intersection of two arrays

    premium question
    completed

    Answer:

  • 87.

    Write a recursive function that returns the binary string of a given decimal number

    premium question
    completed

    Answer:

  • 88.

    How would you use a closure to create a private counter?

    premium question
    completed

    Answer:

  • 89.

    FizzBuzz Challenge

    premium question
    completed

    Answer:

  • 90.

    Given two strings, return true if they are anagrams of one another

    premium question
    completed

    Answer:

  • 91.

    All Permutations (Anagrams) of a String

    premium question
    completed

    Answer:

  • 92.

    Find all string combinations consisting only of 0, 1 and ?

    premium question
    completed

    Answer:

  • 93.

    Generate all balanced bracket combinations

    premium question
    completed

    Answer:

  • 94.

    Implement a queue using two stacks

    premium question
    completed

    Answer:

  • 95.

    Throttle Function Implementation

    premium question
    completed

    Answer:

  • 96.

    Find Word Positions in Text

    premium question
    completed

    Answer:

  • 97.

    Merge two sorted linked lists

    premium question
    completed

    Answer:

  • 98.

    Dutch national flag sorting problem

    premium question
    completed

    Answer:

  • 99.

    Insert an interval into a list of sorted disjoint intervals

    premium question
    completed

    Answer:

  • 100.

    Implement a queue using a linked list

    premium question
    completed

    Answer:

  • 101.

    Quickly calculate the cube root of 6 digit numbers

    premium question
    completed

    Answer:

  • 102.

    Implement pow(a,b) without multiplication or division

    premium question
    completed

    Answer:

  • 103.

    What is the new keyword in JavaScript?

    premium question
    completed

    Answer:

  • 104.

    Explain Prototype Inheritance in JavaScript?

    premium question
    completed

    Answer:

  • 105.

    What does the term Transpiling stand for?

    premium question
    completed

    Answer:

  • 106.

    Can you give an example for destructuring an object or an array in ES6?

    premium question
    completed

    Answer:

  • 107.

    Explain the Prototype Design Pattern

    premium question
    completed

    Answer:

  • 108.

    Describe the JS module design pattern

    premium question
    completed

    Answer:

  • 109.

    Can you describe the main difference between a .forEach loop and a .map() loop and why you would pick one versus the other?

    premium question
    completed

    Answer:

  • 110.

    Explain what is Hoisting in Javascript

    premium question
    completed

    Answer:

  • 111.

    How can you share code between files?

    premium question
    completed

    Answer:

  • 112.

    What are the actual uses of ES6 WeakMap?

    premium question
    completed

    Answer:

  • 113.

    Explain difference between: function Person(){}, var person = Person(), and var person = new Person()?

    premium question
    completed

    Answer:

  • 114.

    Check if a given string is a isomorphic

    premium question
    completed

    Answer:

  • 115.

    What is Hoisting in JavaScript?

    premium question
    completed

    Answer:

  • 116.

    When should you NOT use arrow functions in ES6? Name three or more cases.

    premium question
    completed

    Answer:

  • 117.

    What's the difference between a variable that is: null, undefined or undeclared? How would you go about checking for any of these states?

    premium question
    completed

    Answer:

  • 118.

    What is the Temporal Dead Zone in ES6?

    premium question
    completed

    Answer:

  • 119.

    Explain how JSONP works (and how it's not really Ajax)

    premium question
    completed

    Answer:

  • 120.

    Could you compare usage of Module Pattern vs Constructor/Prototype pattern?

    premium question
    completed

    Answer:

  • 121.

    What's the difference between ES6 Map and WeakMap?

    premium question
    completed

    Answer:

  • 122.

    What is the difference between the await keyword and the yield keyword?

    premium question
    completed

    Answer:

  • 123.

    Compare Async/Await and Generators usage to achive same functionality

    premium question
    completed

    Answer:

  • 124.

    How to deep-freeze object in JavaScript?

    premium question
    completed

    Answer:

  • 125.

    Is it possible to reset an ECMAScript 6 generator to its initial state?

    premium question
    completed

    Answer:

  • 126.

    Is JavaScript a pass-by-reference or pass-by-value language?

    premium question
    completed

    Answer:

  • 127.

    In JavaScript, why is the this operator inconsistent?

    premium question
    completed

    Answer:

  • 128.

    Can you give an example of a curry function and why this syntax offers an advantage?

    premium question
    completed

    Answer:

  • 129.

    Write a recursive function that performs a binary search

    premium question
    completed

    Answer:

  • 130.

    When would you use the bind function?

    premium question
    completed

    Answer:

  • 131.

    Create a function that will evaluate if a given expression has balanced parentheses using stacks

    premium question
    completed

    Answer:

  • 132.

    How would you create a private variable in JavaScript?

    premium question
    completed

    Answer:

  • 133.

    How would you add your own method to the Array object so the following code would work?

    premium question
    completed

    Answer:

  • 134.

    How does the this keyword work? Provide some code examples

    premium question
    completed

    Answer:

  • 135.

    What will be the output of the following code?

    premium question
    completed

    Answer:

  • 136.

    Given an integer, determine if it is a power of 2. If so, return that number, else return -1

    premium question
    completed

    Answer:

  • 137.

    What will the following code output?

    premium question
    completed

    Answer:

  • 138.

    What will be the output of the following code?

    premium question
    completed

    Answer:

  • 139.

    Explain why the following doesn't work as an IIFE. What needs to be changed to properly make it an IIFE?

    premium question
    completed

    Answer:

  • 140.

    What is Closure in JavaScript? Provide an example

    premium question
    completed

    Answer:

  • 141.

    Transform Word

    premium question
    completed

    Answer:

  • 142.

    Describe the Revealing Module Pattern design pattern

    premium question
    completed

    Answer:

One tip that got me hired by Google, Microsoft, and Stripe

I've worked for Microsoft, Google, Stripe, and received offers from many other companies. One thing I learned when I was interviewing myself is that standard interview tips are woefully inadequate.

Reverse Tech Interview: Questions to Stump an Interviewer

Few people want to get into an uncomfortable environment or an unprofitable company with no prospects. If you’re wondering how to get a real feel for a company during an interview, you’re welcome. I’ll give a list of questions that interviewers don’t usually expect...

How to become a programmer, move to the US, and get a dream job

Are you curious about what you need to do to earn more than $15.000 a month, drive a Tesla, live in sunny California, and work at Google, Apple, Facebook, or Amazon?

11 Reactive Systems interview questions and answers for software engineers

Reactive systems are an architectural style that allows multiple individual applications to blend into one unit, reacting to their environment, while staying aware of each other. Here is a list of coding interview questions on Reactive Systems to help you get ready for your next data struc...

. Reactive Systems
34 Microservices interview questions and answers for software engineers

Microservice architecture – a variant of the service-oriented architecture structural style – arranges an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight. Here is a list of coding intervie...

. Microservices
7 Layering & Middleware interview questions for developers

Middleware in the context of distributed applications is software that provides services beyond those provided by the operating system to enable the various components of a distributed system to communicate and manage data. Middleware supports and simplifies complex distributed application...

. Layering & Middleware
55 Docker interview questions and answers for software engineers

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Here is a list of coding interview questions on Docker to help you get ready for your next data structures interview in 2021.

. Docker
23 Databases interview questions and answers for software engineers

A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques. Here is a list of coding interview questions on Databases to help you g...

. Databases
21 Concurrency interview questions and answers for software engineers

In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome. Here is a list of coding interview questions on Concurrency to help you get ready for your n...

. Concurrency
13 CAP Theorem interview questions and answers for software engineers

In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees: Consistency: Every read receives the ...

. CAP Theorem
Load more posts

Features

folder icon

Access all answers

Get the inside track on what to expect in your next tech interview. We offer you a collection of high quality technical interview questions to help you prepare for your next coding interview.

graph icon

Track progress

A smart interface helps you track your progress and focus on the topics you need. You can search through questions or sort them by difficulty or type.

clock icon

Save time

Save tens of hours searching for information on hundreds of low-quality sites designed to drive traffic and make money from advertising.

Land a six-figure job at one of the top companies.

amazon logo facebook logo google logo microsoft logo uber logo
Prepare for a technical interview

Get hired with our
tech interview questions & answers