Frontend Interview Questions

In this series, I will be writing articles explaining some good frontend interview questions and their solutions. These are the questions that I have asked in the interviews that I have taken. Hop on

Articles in this series

Shuffle an array in place

Pinned article
Jun 29, 20213 min read

❓Question Write the function shuffle(array) that shuffles (randomly reorders) elements of the array. Multiple runs of shuffle may lead to different orders of elements. For instance: let arr = [1, 2, 3]; shuffle(arr); // arr = [3, 2, 1] shuffle(arr)...

Shuffle an array in place
In place deduping an array
LocalStorage wrapper with expiration
Implement Promise.all
Find corresponding node in an identical DOM tree