ReactAngularVueSvelteJavaScriptCSSHTMLTypeScript

JavaScript Interview Questions

440+ most important JavaScript interview questions, from library APIs and utility functions to algorithms and UI components.
Solved by ex-interviewers
Test cases
Code in browser

Questions List

JavaScript Interview GuidesExplore our starter guides to get a solid grasp of JavaScript interview prep before jumping into practice.
0/5 guides
GUIDES
  • CounterWarm up questionBuild a simple counter that increments whenever a button is clicked
    Available frameworks
  • Make CounterImplement a function that accepts an integer value and returns a function that can be repeatedly called to return increasing values
    Languages
  • MeanImplement a function that finds the mean of the values inside an array
    Languages
  • Function.prototype.callImplement the Function.prototype.call() function that calls the function with a given `this` value and provided arguments
    Languages
  • Min ByImplement a function that finds the minimum element based on the specified criteria
    Languages
  • Selection SortImplement a function that performs a selection sort
    Languages
  • StackImplement a stack data structure containing the common stack methods
    Languages
  • Type UtilitiesImplement utilities to determine primitive variable types in JavaScript
    Languages
  • AccordionBuild an accordion component that a displays a list of vertically stacked sections with each containing a title and content snippet
    Available frameworks
  • Array.prototype.reduceImplement the Array.prototype.reduce() method
    Languages
  • Count Set Bits in a Binary NumberImplement a function to find set bits in binary representation of a given integer
    Languages
  • CycleImplement a function that takes one or more values and returns a function that cycles through those values each time it is called
    Languages
  • Find Duplicates in ArrayImplement a function to check if there are any duplicate numbers in the array
    Languages
  • Find Missing Number in SequenceImplement a function to find the missing element in a sorted array
    Languages
  • Insertion SortImplement a function that performs an insertion sort
    Languages
  • Optimal Stock TradingImplement a function to find the maximum profit achievable by buying and selling a stock once
    Languages
  • Pair sumImplement a function to find two numbers within an array of integers that add up to a target integer
    Languages
  • Progress BarsBuild a list of progress bars that fill up gradually when they are added to the page
    Available frameworks
  • String AnagramImplement a function to determine if two strings are anagram of each other
    Languages
  • Type Utilities IIImplement utilities to determine non-primitive variable types in JavaScript
    Languages
  • Binary Tree Maximum DepthImplement a function to find the maximum depth of a binary tree
    Languages
  • Flip Binary TreeImplement a function to flip the nodes in a binary tree
    Languages
  • Mortgage CalculatorBuild a calculator that computes the monthly mortgage for a loan
    Available frameworks
  • Staircase Climbing CombinationsImplement a function to find the number of ways to reach at the top of staircase
    Languages
  • Balanced BracketsImplement a function to determine if a string contains balanced brackets
    Languages
  • Binary Tree EqualImplement a function to determine whether two binary trees are equal
    Languages
  • Bit CountingImplement a function to find number of set bits from 0 to n
    Languages
  • Bit ReversalImplement a function to flip the order of the bits in a given number
    Languages
  • Linked List ReversalImplement a function to reverse a linked list
    Languages
  • String PalindromeImplement a function to determine if a string is a palindrome
    Languages
  • Linked List Detect CycleImplement a function to detect if there are cycles in a linked list
    Languages
  • Binary Tree SubtreeImplement a function to check if a binary tree is a subtree of another binary tree
    Languages
  • Linked Lists Combine Two SortedImplement a function to combine two sorted linked list
    Languages
  • Meeting CalendarImplement a function to check if all meetings can be attended
    Languages
  • Array Product Excluding CurrentImplement a function to find the product of elements in an array excluding the current element
    Languages
  • Binary SearchImplement a function that performs binary search on an array of numbers
    Languages
  • Breadth-first SearchImplement a breadth-first search algorithm that traverses a directed graph in a breadth-first manner
    Languages
  • Count ByImplement a function that counts the number of times a value appears in an array based on a function or property name
    Languages
  • CurryImplement a function that transforms a function that takes multiple arguments into a function that can be repeatedly called with only one argument at a time
    Languages
  • DebounceImplement a function to limit how many times a function can be executed by delaying the execution of the function until after a specified time after its last execution attempt
    Languages
  • Depth-first SearchImplement a depth-first search algorithm that traverses a directed graph in a depth-first manner
    Languages
  • Heap SortImplement a function that performs a heap sort
    Languages
  • Is the Graph a TreeImplement a function to determine if a graph is a valid tree
    Languages
  • Maximum Water Trapped Between WallsImplement a function to find the maximum water volume between two walls in an array of walls
    Languages
  • PromisifyImplement a function that takes a function following the common error-first callback style and returns a version that returns promises
    Languages
  • QueueImplement a queue data structure containing the common queue methods
    Languages
  • TabsBuild a tabs component that displays a list of tab elements and one associated panel of content at a time
    Available frameworks
  • ThrottleImplement a function to control the execution of a function by limiting how many times it can execute over time
    Languages
  • ClassnamesImplement a function that conditionally joins CSS class names together
    Languages
  • Data MergingImplement a function to merge rows of data from the same user
    Languages
  • Data TableBuild a users data table with pagination features
    Available frameworks
  • Dice RollerBuild a dice roller app that simulates the results of rolling 6-sided dice
    Available frameworks
  • Event EmitterImplement a class that can subscribe to and emit events that trigger attached callback functions
    Languages
  • File ExplorerBuild a file explorer component to navigate files and directories in a tree-like hierarchical viewer
    Available frameworks
  • FlattenImplement a function that recursively flattens an array into a single level deep
    Languages
  • getElementsByStyleImplement a function to get all DOM elements that are rendered using the specified style
    Languages
  • HTML SerializerImplement a function to serialize an object into an HTML string with indentation
    Languages
  • JSON.stringifyImplement a function that converts a JavaScript value into a JSON string
    Languages
  • Like ButtonBuild a Like button that changes appearance based on the states
    Available frameworks
  • List FormatImplement a function that formats a list of items into a single readable string
    Languages
  • MemoizeImplement a function that returns a memoized version of a function which accepts a single argument
    Languages
  • Merge SortImplement a function that performs a recursive merge sort
    Languages
  • Modal DialogBuild a reusable modal dialog component that can be opened and closed
    Available frameworks
  • Promise.allImplement the Promise.all() function that resolves to an array of results if all the input elements are resolved or rejects otherwise
    Languages
  • Promise.anyImplement the Promise.any() function that resolves when any of the input elements are resolved
    Languages
  • Quick SortImplement a function that performs a recursive quick sort
    Languages
  • Squash ObjectImplement a function that returns a new object after squashing the input object into a single level of depth
    Languages
  • Star RatingBuild a star rating component that shows a row of star icons for users to select the number of filled stars corresponding to the rating
    Available frameworks
  • Todo ListBuild a Todo list that lets users add new tasks and delete existing tasks
    Available frameworks
  • Topological SortImplement a function that performs a topological sort
    Languages
  • Traffic LightBuild a traffic light where the lights switch from green to yellow to red after predetermined intervals and loop indefinitely
    Available frameworks
  • Binary Tree Level Order TraversalImplement a function to find the level order traversal of a binary tree
    Languages
  • Deep CloneImplement a function that performs a deep copy of a value
    Languages
  • Deep EqualImplement a function that determines if two values are equal
    Languages
  • Digital ClockBuild a 7-segment digital clock that shows the current time
    Available frameworks
  • getElementsByClassNameImplement a function to get all DOM elements that contain the specified classes
    Languages
  • Map Async LimitImplement a function that maps an array of items with an asynchronous mapping function while not exceeding the concurrency limit
    Languages
  • Maximum Sum in Contiguous ArrayImplement a function to find the subarray with the maximum sum
    Languages
  • Smallest element in rotated sorted arrayImplement a function to find the smallest element in rotated sorted array
    Languages
  • Tic-tac-toeBuild a tic-tac-toe game that is playable by two players
    Available frameworks
  • Deep OmitImplement a function that removes specified keys and their corresponding values from an object, including nested objects or arrays
    Languages
  • Find Element in Rotated ArrayImplement a function to find an integer in a rotated sorted array
    Languages
  • Image CarouselBuild an image carousel that displays a sequence of images
    Available frameworks
  • Job BoardBuild a job board that displays the latest job postings from Hacker News
    Available frameworks
  • Maximum Product in Contiguous ArrayImplement a function to find the subarray which has the largest product
    Languages
  • StopwatchBuild a stopwatch widget that can measure how much time has passed
    Available frameworks
  • Transfer ListBuild a component that allows transferring of items between two lists
    Available frameworks
  • Binary Search Tree Kth Smallest ElementImplement a function to find the kth smallest node in a BST
    Languages
  • Binary Search Tree Lowest Common AncestorImplement a function to find the LCA in a binary search tree
    Languages
  • Count Islands in a GridImplement a function to count distinct islands in a 2D binary grid
    Languages
  • Delete Nth Node from End of Linked ListImplement a function to delete the nth node from the end of a linked list
    Languages
  • Distinct Paths in GridImplement a function to calculate distinct paths for a robot moving on an m x n grid
    Languages
  • Matrix ZeroingImplement a function to set matrix rows and columns to zero
    Languages
  • Merge Overlapping IntervalsImplement a function to merge overlapping intervals
    Languages
  • Most Common ElementsImplement a function to determine the most common elements in an integer array
    Languages
  • Neighborhood TheftImplement a function to find maximum money to rob without alerting police
    Languages
  • Rearrange Linked ListImplement a function to rearrange the nodes in a linked list
    Languages
  • Sum Without AdditionImplement a function to find the sum of two integers without using + and - operator
    Languages
  • Triplet SumImplement a function to find all unique triplets with distinct indices that sum to 0
    Languages
  • Validate Binary Search TreeImplement a function to validate whether a binary tree is a valid binary search tree
    Languages
  • Combinations for Target SumImplement a function to count combinations that sum to the target
    Languages
  • Course DependencyImplement a function to check if all courses can be completed given prerequisites
    Languages
  • Decode MessageImplement a function to count ways to decode a numeric string
    Languages
  • Longest Consecutive Number SequenceImplement a function to find the length of the longest consecutive number sequence
    Languages
  • NEW
    Longest Increasing SubsequenceImplement a function to find the length of the longest increasing subsequence
    Languages
  • NEW
    Minimum Coins for ChangeImplement a function to return minimum coins needed to make the given amount
    Languages
  • Palindromic SubstringsImplement a function to count all palindromic substrings in a string
    Languages
  • Segment WordsImplement a function to check whether a string be formed from dictionary words
    Languages
  • String Anagram GroupsImplement a function to group an array of strings into anagrams
    Languages
  • Task CoordinationImplement a function to find minimum intervals for tasks with cooldown
    Languages
  • Trie (Prefix Tree)Implement a trie-prefix-tree with insert, search, and starts with functionality
    Languages
  • Binary Tree Rebuilding from Preorder and Inorder TraversalsImplement a function to construct a binary tree from preorder and inorder traversals
    Languages
  • Disjoint IntervalsImplement a function to determine the minimum amount of removals to get non-overlapping intervals
    Languages
  • End of Array ReachableImplement a function to determine if the end of the array is reachable
    Languages
  • Find the Longest Palindromic SubstringImplement a function to find the longest palindromic substring
    Languages
  • Find Word in GridImplement a function to check the existence of a word in a grid
    Languages
  • Graph Count Connected ComponentsImplement a function to count connected components in a graph
    Languages
  • Longest Common SubsequenceImplement a function to find the longest common subsequence in two strings
    Languages
  • Longest Non-repeating SubstringImplement a function to find the length of longest substring with unique characters
    Languages
  • Longest Repeating Substring After ReplacementsImplement a function to find the longest uniform substring after up to k replacements
    Languages
  • Matrix RotationImplement a function to rotate the given matrix by 90 degrees
    Languages
  • Matrix Spiral TraversalImplement a function to traverse the matrix in spiral order
    Languages
  • Merge New IntervalImplement a function to insert a new interval in the given intervals
    Languages
  • Neighborhood Theft (Circular)Implement a function to find maximum money to rob in circular houses without alerting police
    Languages
  • Ocean FlowImplement a function returning cells with water flow to both oceans
    Languages
  • Word FinderImplement a data structure where words can be added and support wildcard searching
    Languages
  • Graph CloneImplement a function to deeply clone a connected and undirected graph
    Languages
  • Minimum Meeting Rooms NeededImplement a function to find the minimum number of required conference rooms
    Languages
  • Binary Tree Serialization and DeserializationImplement a function to serialize and deserialize a binary tree
    Languages
  • Binary Tree Maximum Total PathImplement a function to find the maximum total of nodes in a binary tree path
    Languages
  • Find Words in GridImplement a function to find all the words present in the grid
    Languages
  • Nested CheckboxesBuild a nested checkboxes component with parent-child selection logic
    Available frameworks
  • Linked Lists Combine K SortedImplement a function to combine k sorted linked lists
    Languages
  • Shortest Substring Containing CharactersImplement a function to return the smallest substring of a string containing all characters from another string
    Languages
  • Extraterrestrial LanguageImplement a function to verify and return an extraterrestrial language's alphabet order
    Languages
  • Number Stream MedianImplement a function to find the median of a dynamic stream of integers
    Languages
  • ClampPremiumImplement a function to clamp a number within the inclusive lower and upper bounds
    Languages
  • Function LengthPremiumImplement a function that returns the number of parameters expected by a function
    Languages
  • Number of ArgumentsPremiumImplement a function that returns the number of arguments it was called with
    Languages
  • SleepPremiumImplement a function that pauses for a specified duration before resuming execution
    Languages
  • Array.prototype.squarePremiumImplement a custom Array.prototype.square() method that squares the values in an array
    Languages
  • Cancellable IntervalPremiumImplement a function that acts like setInterval but returns a function to cancel the interval
    Languages
  • Cancellable TimeoutPremiumImplement a function that acts like setTimeout but returns a function to cancel the pending callback
    Languages
  • ChunkPremiumImplement a function that creates an array of elements split into smaller groups of a specified size
    Languages
  • CompactPremiumImplement a function that creates an array with all falsey values removed
    Languages
  • DifferencePremiumImplement a function that finds the difference in values between arrays
    Languages
  • Drop Right WhilePremiumImplement a function that excludes elements from the end of an array until the predicate returns false
    Languages
  • Drop WhilePremiumImplement a function that excludes elements from the beginning of an array until the predicate returns false
    Languages
  • FillPremiumImplement a function that fills an array with values within specified indices
    Languages
  • Find IndexPremiumImplement a function that returns the index of the first element in the array that satisfies the provided testing function
    Languages
  • Find Last IndexPremiumImplement a function that returns the index of the last element in the array that satisfies the provided testing function
    Languages
  • From PairsPremiumImplement a function that returns an object composed from key-value pairs
    Languages
  • Function.prototype.applyPremiumImplement the Function.prototype.apply() function that calls the function with a given `this` value and arguments as an array
    Languages
  • GetPremiumImplement a function to safely access deeply-nested properties in JavaScript objects
    Languages
  • In RangePremiumImplement a function to check if a number falls between two numbers
    Languages
  • IntersectionPremiumImplement a function that computes the intersection of arrays, returning a new array containing unique values present in all given arrays
    Languages
  • Max ByPremiumImplement a function that finds the maximum element based on the specified criteria
    Languages
  • Object MapPremiumImplement a function to transform values within an object
    Languages
  • OncePremiumImplement a function that accepts a callback and restricts its invocation to at most once
    Languages
  • Promise.rejectPremiumImplement a function to return a Promise object rejected with a reason
    Languages
  • RangePremiumImplement a function that returns a sequence of numbers in ascending order
    Languages
  • Range RightPremiumImplement a function that returns a sequence of numbers in descending order
    Languages
  • SingletonPremiumImplement a Singleton class that ensures a class has only one instance while providing a global point of access to that instance
    Languages
  • Unique ArrayPremiumImplement a function to remove all duplicate values from an array
    Languages
  • Array.prototype.atPremiumImplement the Array.prototype.at() method
    Languages
  • Array.prototype.filterPremiumImplement the Array.prototype.filter() method
    Languages
  • Array.prototype.mapPremiumImplement the Array.prototype.map() method
    Languages
  • ComposePremiumImplement a function that takes multiple functions as arguments and returns a new function that applies those functions in reverse
    Languages
  • Flight BookerPremiumBuild a component that books a flight for specified dates
    Available frameworks
  • Function.prototype.bindPremiumImplement the Function.prototype.bind() function that creates a new function with the `this` keyword set to a provided value
    Languages
  • Generate TablePremiumGenerate a table of numbers given the rows and columns
    Available frameworks
  • jQuery.cssPremiumImplement a jQuery-like function that sets the style of a DOM element
    Languages
  • Progress BarPremiumBuild a progress bar component that shows the percentage completion of an operation
    Available frameworks
  • Promise.racePremiumImplement the Promise.race() function that resolves or rejects when any of the input elements are resolved or rejected
    Languages
  • SizePremiumImplement a function that returns the size of collection
    Languages
  • SumPremiumImplement a function that sums numbers by accepting a number and allows for repeated calling with more numbers until it is not called with any number
    Languages
  • Temperature ConverterPremiumBuild a temperature converter widget that converts temperature values between Celsius and Fahrenheit
    Available frameworks
  • Make Counter IIPremiumImplement a function that returns a counter object with methods to retrieve and manipulate the value
    Languages
  • Array.prototype.concatPremiumImplement the Array.prototype.concat() method
    Languages
  • Group ByPremiumImplement a function that groups values in an array based on a function or property name
    Languages
  • Intersection ByPremiumImplement a function that returns an array of unique values that are included in all given arrays based on a provided iteratee function
    Languages
  • Intersection WithPremiumComputes the intersection of arrays using a custom comparator function to determine equality between elements
    Languages
  • Is EmptyPremiumImplement a function to check if a value is an empty object, collection, map, or set
    Languages
  • LimitPremiumImplement a function that accepts a callback and restricts its invocation to at most N times
    Languages
  • Promise MergePremiumImplement a function to merge the results of two promises into a single value
    Languages
  • Promise TimeoutPremiumImplement a function that resolves a promise if it is fulfilled within a timeout period and rejects otherwise
    Languages
  • Promise.resolvePremiumImplement a function to resolve a given value to a Promise
    Languages
  • Promise.withResolversPremiumImplement a function that returns an object containing a new `Promise` object and two functions to resolve or reject it
    Languages
  • Promisify IIPremiumImplement a promisify function that allows the original function to override the return value
    Languages
  • TurtlePremiumImplement a Turtle class that moves a turtle on a 2D plane
    Languages
  • Union ByPremiumImplement a function that creates an array of unique values, in order, from all given arrays.
    Languages
  • Accordion IIPremiumBuild an accessible accordion component that has the right ARIA roles, states, and properties
    Available frameworks
  • Accordion IIIPremiumBuild a fully accessible accordion component that has keyboard support according to ARIA specifications
    Available frameworks
  • Analog ClockPremiumBuild an analog clock where the hands update and move like a real clock
    Available frameworks
  • Camel Case KeysPremiumImplement a function to convert all the keys in an object to camel case
    Languages
  • Compact IIPremiumImplement a function that returns an object with all falsey values removed
    Languages
  • Conforms ToPremiumImplement a function that checks if object conforms to source
    Languages
  • Curry IIPremiumImplement a function that transforms a function that takes multiple arguments into a function that can be repeatedly called with any number of arguments
    Languages
  • Data Table IIPremiumBuild a users data table with sorting features
    Available frameworks
  • Debounce IIPremiumImplement a debounce function that comes with a cancel method to cancel delayed invocations and a flush method to immediately invoke them
    Languages
  • Event Emitter IIPremiumImplement a class that can subscribe to and emit events that trigger attached callback functions. Subscription objects are returned and can unsubscribe itself
    Languages
  • File Explorer IIPremiumBuild a semi-accessible file explorer component that has the right ARIA roles, states, and properties
    Available frameworks
  • File Explorer IIIPremiumBuild a file explorer component using a flat DOM structure
    Available frameworks
  • getElementsByTagNamePremiumImplement a function to get all DOM elements that match a tag
    Languages
  • Grid LightsPremiumBuild a grid of lights where the lights deactivate in the reverse order they were activated
    Available frameworks
  • Identical DOM TreesPremiumImplement a function to determine if two DOM trees are the same
    Languages
  • jQuery Class ManipulationPremiumImplement a set of jQuery-like functions that manipulates classes on a DOM element
    Languages
  • Map AsyncPremiumImplement a function that maps an array of items with an asynchronous mapping function
    Languages
  • Modal Dialog IIPremiumBuild a semi-accessible modal dialog component that has the right ARIA roles, states, and properties
    Available frameworks
  • Modal Dialog IIIPremiumBuild a moderately-accessible modal dialog component that supports common ways to close the dialog
    Available frameworks
  • Progress Bars IIPremiumBuild a list of progress bars that fill up gradually in sequence, one at a time
    Available frameworks
  • Promise.allSettledPremiumImplement the Promise.allSettled() function that resolves to an array of outcomes when all the input elements are either resolved or rejected
    Languages
  • Resumable IntervalPremiumImplement a function that creates a resumable interval object
    Languages
  • Tabs IIPremiumBuild a semi-accessible tabs component that has the right ARIA roles, states, and properties
    Available frameworks
  • Tabs IIIPremiumBuild a fully accessible tabs component that has keyboard support according to ARIA specifications
    Available frameworks
  • Text SearchPremiumImplement a function to highlight text if a searched term appears within it
    Languages
  • Deep MapPremiumImplement a function to recursively transform values
    Languages
  • Progress Bars IIIPremiumBuild a list of progress bars that fill up gradually concurrently, up to a limit of 3
    Available frameworks
  • Text Search IIPremiumImplement a function to highlight text if searched terms appear within it
    Languages
  • Birth Year HistogramPremiumBuild a widget that fetches birth year data from an API and plot it on a histogram
    Available frameworks
  • Connect FourPremiumBuild a game for two players who take turns to drop colored discs from the top into a vertically suspended board/grid
    Available frameworks
  • Deep MergePremiumImplement a function that merges two objects together
    Languages
  • Image Carousel IIPremiumBuild an image carousel that smoothly transitions between images
    Available frameworks
  • Memoize IIPremiumImplement a function that returns a memoized version of a function which accepts any number of arguments
    Languages
  • Pixel ArtPremiumBuild a pixel art drawing tool where users can paint pixels with selected colors
    Available frameworks
  • Signup FormPremiumBuild a signup form that does validation on user details and submits to a back end API
    Available frameworks
  • Undoable CounterPremiumBuild a counter with a history of the values and ability to undo/redo actions
    Available frameworks
  • Users DatabasePremiumBuild a UI to filter, create, update, and delete users
    Available frameworks
  • Whack-A-MolePremiumBuild a popular arcade game where players attempt to hit moles as they pop up from holes in a board
    Available frameworks
  • Memory GamePremiumBuild a memory game where the player needs to match pairs of cards
    Available frameworks
  • Curry IIIPremiumImplement a function which transforms a function which takes variadic arguments into a function that can be repeatedly called with any number of arguments
    Languages
  • Auth Code InputPremiumBuild an auth code input component that allows users to enter a 6-digit authorization code
    Available frameworks
  • Classnames IIPremiumImplement a function that conditionally joins CSS class names together and also handles de-duplication and function values
    Languages
  • Progress Bars IVPremiumBuild a list of progress bars that fill up gradually concurrently, up to a limit of 3 and allows for pausing and resuming
    Available frameworks
  • Backbone ModelPremiumImplement a class resembling Backbone.Model which allows storing of attributes/values and responding to changes in specific attribute values
    Languages
  • Data SelectionPremiumImplement a function to filter rows of data matching a specified requirement
    Languages
  • Data Table IIIPremiumBuild a generalized data table with pagination and sorting features
    Available frameworks
  • getElementsByTagNameHierarchyPremiumImplement a function to get all DOM elements that match a tag hierarchy
    Languages
  • Modal Dialog IVPremiumBuild a fully-accessible modal dialog component that supports all required keyboard interactions
    Available frameworks
  • Table of ContentsPremiumImplement a function to construct a table of contents from an HTML document
    Languages
  • Data Table IVPremiumBuild a generalized data table with pagination, sorting and filtering features
    Available frameworks
  • Image Carousel IIIPremiumBuild an image carousel that smoothly transitions between images that has a minimal DOM footprint
    Available frameworks
  • Selectable CellsPremiumBuild an interface where users can drag to select multiple cells within a grid
    Available frameworks
  • Tic-tac-toe IIPremiumBuild an N x N tic-tac-toe game that requires M consecutive marks to win
    Available frameworks
  • Transfer List IIPremiumBuild a component that allows transferring of items between two lists, bulk selection/unselection of items, and adding of new items
    Available frameworks
  • Deep Clone IIPremiumImplement a function that performs a deep copy of a value, but also handles circular references
    Languages
  • JSON.stringify IIPremiumImplement a function that converts a JavaScript value into a JSON string
    Languages
  • WordlePremiumBuild Wordle, the word-guessing game that took the world by storm
    Available frameworks

JavaScript Interview Questions and Answers

Tired of poor quality JavaScript interview and questions lists? Discover the ultimate resource for JavaScript interview preparation with our high quality list of over 443 JavaScript interview questions and answers.

Curated and answered by ex-FAANG interviewers, our collection of must-know javascript interview questions ensures you're prepared for any kind of interview you may face. Each question also comes with example solutions and comprehensive, automated test cases so that you always know how to improve within seconds.

Our list contains 2 large categories of questions - the JavaScript coding interview questions and JavaScript quiz interview questions.

JavaScript Coding Interview Questions

Master essential JavaScript techniques and interview patterns by practicing with our list of well-curated JavaScript coding interview questions. From implementing common library APIs, utility functions, user interfaces and components, to data structures and algorithms, we offer numerous practice questions with example answers (solved with code).

Additionally, we provide an in-browser coding workspace, allowing you to code directly in the browser with no setup required. Run your code against our automated test cases and know if it's accurate within seconds. Moreover, you can further improve your code and adapt best practices from the well-explained solutions we provide, written by credible and revered former big tech senior/staff engineers.

JavaScript Quiz Interview Questions

JavaScript interview trivia questions generally test your JavaScript know-how and fundamentals. We have the top 195 questions that are commonly asked in such interviews, including important topics like accessibility, internationalization, performance, network, security and testing. Again, we provide good answers to these questions written by ex-interviewers.