Javascript Interview: Remove Duplicates [Commonly Asked Question]

preview_player
Показать описание
Javascript Coding Interview: Remove Duplicates (Common Asked Question)

This video is to show different solutions to the question `Write a function that will remove duplicate in an array`. Another variation of question could be `Get all the unique characters from a list`. This may show up on your next job interview.

Note: I just choose to increment the second solution (map solution) but its value can be set to any truthy value like true or 1. I chose to increment so we may potentially use it in case we need to find how many characters are there.

Buy Me A Coffee: If you want to support me and thank you in advance!
Рекомендации по теме
Комментарии
Автор

i used reduce for my first solution, and for loop and push for my 2nd solution. it's amazing how many different solutions are possible

alvinacosta
Автор

Would you use my solution in an interview or you would tackle the problem in a different approach?

ASoftwareEngineer