Backend Developer
JavaScript and TypeScript questions
74 questions on JavaScript and TypeScript for backend developers, easiest first.
Easy 41
- Promise and setTimeout ordereasy
- fetch treats a 404 as successeasy
- slice vs spliceeasy
- indexOf and NaNeasy
- new Array(3) then mapeasy
- Value missing from indexOfeasy
- parseInt on a CSS valueeasy
- Number of an empty form fieldeasy
- Checking whether a value is an arrayeasy
- Comparing an array with its copyeasy
- Using shift as a queueeasy
- join with null valueseasy
- Flattening a nested arrayeasy
- Removing duplicates with a Seteasy
- Number keys in a plain objecteasy
- Iteration order of a Mapeasy
- When to choose Map over a plain objecteasy
- Set of look-alike objectseasy
- Reading a key that is not in a Mapeasy
- Checking a key by its valueeasy
- Counting entries in a Mapeasy
- Adding a value that is already in a Seteasy
- Building a Map from pairseasy
- Looping over a Mapeasy
- Adding stock to an inventory mapeasy
- What Map.delete returnseasy
- The in operator on a plain objecteasy
- Argument order in Map.forEacheasy
- Turning a Map into an object for JSONeasy
- String and number keys in a Mapeasy
- Set size after a deleteeasy
- Type of keys from Object.keyseasy
- Emptying a Mapeasy
- Unique letters in a wordeasy
- Checking for NaNeasy
- Dividing by zero in JavaScripteasy
- parseInt with a radixeasy
- JavaScript default sort on numberseasy
- Comparator sign for ascending ordereasy
- Using a JavaScript array as a stackeasy
- Cost of Array.shift in a queueeasy
Medium 18
- Copying an array of order objectsmedium
- Building a grid with fillmedium
- Comparing numeric stringsmedium
- forEach on an array with holesmedium
- Overflow in an Int32Arraymedium
- Reading the last elementmedium
- Grid coordinates as a JavaScript keymedium
- Caching data per object without leaksmedium
- Ranking products by salesmedium
- Checking that two Sets are equalmedium
- Built-in Set operations in JavaScriptmedium
- 2**31 | 0 in JavaScriptmedium
- What -1 >>> 0 givesmedium
- Math.round(-2.5) in JavaScriptmedium
- Is JavaScript Array sort stable?medium
- Comparator that returns a booleanmedium
- Sorting customer names correctlymedium
- Promise callback versus setTimeout ordermedium
Hard 15
- Removing items while looping forwardhard
- Counting DP mod 1e9+7 in JavaScripthard
- Deleting entries while loopinghard
- Word counts that break on "constructor"hard
- NaN and -0 as Map keyshard
- Key order in a plain objecthard
- Adding to a Map during forEachhard
- What Object.groupBy returnshard
- Memo cache misses for equal argumentshard
- Adding 1 to 2^53hard
- Default sort of a Float64Arrayhard
- Binary search loop that never endshard
- Bit-shift midpoint in JavaScripthard
- Do circular links leak memory in JavaScript?hard
- Promise loop that freezes timershard