BFE
.dev
EN
Practice
Explore
EN
JavaScript Coding Questions
As a Front-End developer, JavaScript is the core skill of everything
Sort
Difficulty
Solved status
Company
tag: JavaScript
1. implement curry()
JavaScript
easy
2. implement curry() with placeholder support
JavaScript
medium
3. implement Array.prototype.flat()
JavaScript
easy
4. implement basic throttle()
JavaScript
Lodash
medium
5. implement throttle() with leading & trailing option
JavaScript
Lodash
medium
6. implement basic debounce()
JavaScript
Lodash
easy
7. implement debounce() with leading & trailing option
JavaScript
Lodash
medium
8. can you shuffle() an array?
JavaScript
medium
9. decode message
JavaScript
medium
10. first bad version
JavaScript
Algorithm
medium
11. what is Composition? create a pipe()
JavaScript
easy
12. implement Immutability helper
JavaScript
medium
13. Implement a Queue by using Stack
JavaScript
Algorithm
medium
14. Implement a general memoization function - `memo()`
JavaScript
medium
15. implement a simple DOM wrapper to support method chaining like jQuery
JavaScript
easy
16. create an Event Emitter
JavaScript
medium
17. Create a simple store for DOM element
JavaScript
easy
18. Improve a function
JavaScript
easy
19. find corresponding node in two identical DOM tree
JavaScript
easy
20. Detect data type in JavaScript
JavaScript
medium
21. implement JSON.stringify()
JavaScript
hard?
22. implement JSON.parse()
JavaScript
medium
23. create a sum()
JavaScript
easy
24. create a Priority Queue in JavaScript
JavaScript
Algorithm
medium
25. Reorder array with new indexes
JavaScript
Algorithm
easy
26. implement Object.assign()
JavaScript
medium
27. implement completeAssign()
JavaScript
medium
28. implement clearAllTimeout()
JavaScript
easy
29. implement async helper - `sequence()`
JavaScript
medium
30. implement async helper - `parallel()`
JavaScript
medium
31. implement async helper - `race()`
JavaScript
easy
32. implement `Promise.all()`
JavaScript
medium
33. implement `Promise.allSettled()`
JavaScript
medium
34. implement `Promise.any()`
JavaScript
medium
35. implement `Promise.race()`
JavaScript
easy
36. create a fake timer(setTimeout)
JavaScript
medium
37. implement Binary Search (unique)
JavaScript
easy
38. implement `jest.spyOn()`
JavaScript
easy
39. implement range()
JavaScript
easy
40. implement Bubble Sort
JavaScript
Algorithm
easy
41. implement Merge Sort
JavaScript
Algorithm
medium
42. implement Insertion Sort
JavaScript
Algorithm
easy
43. implement Quick Sort
JavaScript
Algorithm
medium
44. implement Selection Sort
JavaScript
Algorithm
easy
45. find the K-th largest element in an unsorted array
JavaScript
Algorithm
medium
46. implement `_.once()`
JavaScript
Lodash
medium
47. reverse a linked list
JavaScript
Algorithm
easy
48. search first index with Binary Search(possible duplicate array)
JavaScript
Algorithm
easy
49. search last index with Binary Search(possible duplicate array)
JavaScript
Algorithm
easy
50. search element right before target with Binary Search(possible duplicate array)
JavaScript
Algorithm
easy
51. search element right after target with Binary Search(possible duplicate array)
JavaScript
Algorithm
easy
52. create a middleware system
JavaScript
medium
53. write your own `extends` in es5
JavaScript
medium
54. flatten Thunk
JavaScript
easy
55. highlight keywords in HTML string
JavaScript
Algorithm
medium
56. call APIs with pagination
JavaScript
medium
57. create an Observable
JavaScript
medium
58. get DOM tree height
JavaScript
Algorithm
DOM
medium
59. create a browser history
JavaScript
medium
60. create your own `new` operator
JavaScript
easy
61. create your own `Function.prototype.call`
JavaScript
medium
62. implement BigInt addition
JavaScript
Algorithm
easy
63. create `_.cloneDeep()`
JavaScript
Algorithm
Lodash
medium
64. auto-retry Promise on rejection
JavaScript
medium
65. add comma to number
JavaScript
medium
66. remove duplicates from an array
JavaScript
Algorithm
medium
67. create your own Promise
JavaScript
medium
68. get DOM tags
JavaScript
Algorithm
DOM
medium
69. implement deep equal `_.isEqual()`
JavaScript
Lodash
medium
70. implement Observable.from()
JavaScript
medium
71. implement Observable Subject
JavaScript
medium
72. implement Observable interval()
JavaScript
easy
73. implement Observable fromEvent()
JavaScript
easy
74. implement Observable Transformation Operators
JavaScript
easy
75. implement BigInt subtraction
JavaScript
Algorithm
medium
76. implement BigInt addition with sign
JavaScript
medium
77. implement BigInt subtraction with sign
JavaScript
medium
78. convert HEX color to RGBA
JavaScript
medium
79. convert snake_case to camelCase
JavaScript
medium
80. implement your own URLSearchParams
JavaScript
hard?
81. merge sorted arrays
JavaScript
Algorithm
easy
82. find available meeting slots
JavaScript
Algorithm
medium
83. create an interval
JavaScript
medium
84. create a fake timer (setInterval)
JavaScript
medium
85. implement `_.get()`
JavaScript
Lodash
medium
86. Generate Fibonacci Number
JavaScript
Algorithm
medium
87. longest substring with unique characters
JavaScript
Algorithm
easy
88. support negative Array index in JavaScript
JavaScript
medium
89. Next Right Sibling
JavaScript
DOM
easy
90. write your own `instanceof`
JavaScript
medium
91. invert a binary tree
JavaScript
Algorithm
easy
92. throttle Promises
JavaScript
medium
93. Generate Fibonacci Number with recursion
JavaScript
easy
94. implement your own `Object.create`
JavaScript
easy
95. implement String.prototype.trim()
JavaScript
medium
96. count "1" in binary form
JavaScript
easy
97. compress a string
JavaScript
string
medium
98. validate an IP address
JavaScript
medium
99. extract all anchor element from HTML string
JavaScript
medium
100. detect circle in linked list
JavaScript
Algorithm
easy
101. merge identical API calls
JavaScript
medium
102. validate string of parentheses
JavaScript
Algorithm
string
easy
103. implement Math.sqrt()
JavaScript
Algorithm
medium
104. Traverse DOM level by level
JavaScript
Algorithm
DOM
medium
105. find the first duplicate character in a string
JavaScript
string
easy
106. Find two numbers that sum up to 0
JavaScript
Algorithm
easy
107. Find the largest difference
JavaScript
Algorithm
easy
108. Implement a Stack by using Queue
JavaScript
Algorithm
medium
109. implement `Math.pow()`
JavaScript
Algorithm
easy
110. serialize and deserialize binary tree
JavaScript
Algorithm
medium
111. Count palindromic substrings
JavaScript
Algorithm
string
medium
112. remove duplicate characters in a string
JavaScript
Algorithm
string
medium
113. Virtual DOM I
JavaScript
Algorithm
DOM
medium
114. implement BigInt multiplication
JavaScript
medium
115. implement BigInt division
JavaScript
medium
116. implement Object.is()
JavaScript
easy
117. event delegation
JavaScript
medium
118. Virtual DOM II - createElement
JavaScript
easy
119. create a tokenizer
JavaScript
medium
120. create `isPrime()`
JavaScript
Algorithm
easy
121. A number sequence
JavaScript
easy
122. implement memoizeOne()
JavaScript
medium
123. implement Promise.prototype.finally()
JavaScript
medium
124. calculate arithmetic expression
JavaScript
Algorithm
medium
125. implement classNames()
JavaScript
medium
126. BigDecimal addition
JavaScript
Algorithm
medium
127. BigDecimal subtraction
JavaScript
Algorithm
medium
128. BigDecimal multiplication
JavaScript
Algorithm
medium
129. BigDecimal Division
JavaScript
Algorithm
medium
130. create LazyMan()
JavaScript
medium
131. implement _.chunk()
JavaScript
Lodash
medium
132. the angle between hour hand and minute hand of a clock
JavaScript
medium
133. roman numerals to integer
JavaScript
easy
134. create your own Cookie
JavaScript
medium
135. localStorage with expiration
JavaScript
medium
136. find median of two sorted array
JavaScript
Algorithm
medium
137. binary tree vertical traversal
JavaScript
Algorithm
hard?
138. Intersection of two sorted arrays
JavaScript
Algorithm
easy
139. implement _.partial()
JavaScript
Lodash
medium
140. Virtual DOM III - Functional Component
JavaScript
easy
141. implement btoa()
JavaScript
easy
142. lit-html 1 - tagged templates
JavaScript
lit-html
easy
143. Virtual DOM IV - JSX 1
JavaScript
medium
144. serialize and deserialize data types not supported in JSON
JavaScript
medium
145. most frequently occurring character
JavaScript
easy
146. implement Array.prototype.reduce()
JavaScript
medium
147. Pick up stones
JavaScript
easy
148. create a counter object
JavaScript
easy
149. interpolation
JavaScript
medium
150. Virtual DOM V - JSX 2
JavaScript
medium
151. implement Array.prototype.map()
JavaScript
medium
152. Find Top k Elements
JavaScript
Algorithm
medium
153. uglify CSS class names
JavaScript
medium
154. Two-way binding
JavaScript
DOM
easy
155. create a count function
JavaScript
easy
156. implement `_.set()`
JavaScript
Lodash
medium
157. semver compare
JavaScript
easy
158. Previous Left Sibling
JavaScript
DOM
medium
159. implement promisify()
JavaScript
easy
160. implement atob()
JavaScript
medium
161. toBe() or not.toBe()
JavaScript
medium
162. find the single integer
JavaScript
Algorithm
easy
163. integer to roman numerals
JavaScript
Algorithm
easy
164. implement Immer produce()
JavaScript
medium
166. validate number string
JavaScript
Algorithm
string
medium
167. Intersection of unsorted arrays
JavaScript
Algorithm
easy
168. move zeros
JavaScript
Algorithm
medium
169. LRU - Chrome storage automatic eviction
JavaScript
Algorithm
medium
170. Generate CSS Selector for target element
JavaScript
medium
171. create callback on message channel
JavaScript
medium
172. implement `Math.clz32()`
JavaScript
medium
173. uncompress string
JavaScript
string
algorithm
medium
174. CSS Grid Layout auto-placement algorithm - sparse
JavaScript
CSS
hard?
175. CSS Grid Layout auto-placement algorithm - dense
JavaScript
CSS
medium
176. undefined to null
JavaScript
medium
177. Implement Object.groupBy()
JavaScript
medium