Implement/polyfills Array Functions like a map, reduce, filter, forEach and find in Javascript

preview_player
Показать описание
This covers polyfills/own implementation of the popular Array Functions like Map, Find, filter, Reduce, ForEach in Javascript. This is very popular among the interviewer in UI technologies.
This is the first video of the JS interview series. Many more such videos will follow. Please suggest any topic which you find difficult, I will try to explain it through the video tutorial.

00:00 introduction
00:25 Polyfill of forEach
10:20 Polyfill of map
16:45 Polyfill of filter
24:04 Polyfill of find
28:35 Polyfill of reduce
Рекомендации по теме
Комментарии
Автор

The most underrated video for pollyfills… the best explanation i can. Find

praffulpatil
Автор

Very nice explanation.. .. I understood all these concepts so well .. Thank you

dancelifevarsha
Автор

Your explanation made this concept so easy in my eyes. Thank you brother! Hope you make more content! :)

hercules
Автор

Thanks for sharing in-depth knowledge on JavaScript ... Glad I learned some new stuff ... Please, upload many videos ... Thank you brother.

adityamohan
Автор

Great content, thanks for making it.

sidd
Автор

Thank you for creating this video - I finally understand how these methods work and they don't feel like magic anymore - especially

richardjamesbunker
Автор

Thanks for sharing this. It helped me.

warunsharma
Автор

Just one suggestion for reducer polyfill. Change line 72 to let accumulator = initialValue ? initialValue : this[0] . If there is no initial value reducer function sets the initial value to first element in the array. Amazing explanation otherwise 👍

rohitgupta
Автор

This is super helpful :) Thanks a lot for sharing this..

jagmeetsingh
Автор

Great Video 👍 Will follow this channel for all JS topics. Looking forward for more videos. 🍺

jitinbisht
Автор

This is really good!! Subscribed. Looking forward to more videos.

tone_deff
Автор

Great Explanation !! Looking forward for more videos 😁

mayurithakur
Автор

You made polyfills look easy bro !!

Thanks a lot.

deepakraghav
Автор

thanks a lot bro. u are doing an awesome job by sharing very expensive knowledge

tentx
Автор

The reduce polyfill will fail, if no initial value is given.
Correct solution:
Array.prototype.myReduce = function (callback, initial) {
let ans = initial ? initial : this[0];
for (let index = initial ? 0 : 1; index < this.length; index++) {
ans = callback(ans, this[index], index, this)
}
return ans;
}

jitinlamba
Автор

// Simplest way for map

for(let val of this){
callback(val)
}
}

// Simplest way for forEach Method

for(let val of this){
callback(val)
}
}

sharadpawar
Автор

u never use ur mymap function.did u realize?u instead used 'map' while calling(that js provides)

samarkhan
join shbcf.ru