Higher Order Functions in JavaScript Explained Simply

preview_player
Показать описание
Higher Order Functions & Callback Functions in JavaScript Explained Simply

In JavaScript, a higher-order function is a function that takes one or more functions as arguments, or returns a function as output. These functions are a powerful feature of the language that allow you to write concise and expressive code.

The best way to learn higher order functions (and likely the most “real-world”) is to look at “map()” and “filter()”. Both take functions as arguments where the function is applied to each element in an array.

Map
For example, consider the map function, which is used to apply a function to each element of an array and return a new array containing the results.

The map function is a higher-order function because it takes a function as its argument, in this case the function to apply to each element of the array.
Рекомендации по теме
Комментарии
Автор

I wish more people would explain code like you. Very good explanations and analogies. It's super easy to understand. I feel like you covered all possible confusions that people might have, that others don't even think of.

leandrorodriguez
Автор

+1 subscriber, There is no way to make a simpler explanation. Thank you so much.

_onlyFran_
Автор

I'm mad I didn't find your channel sooner. God tier instructor... thank you!!!

julieyeaeun
Автор

good lord, all I had needed was the explanation of func vs func(). It all makes sense now, thanks!

alexnorby
Автор

Wow 👏.. You've just simplified everything to my understanding. I'm your new subscriber.

mohabdulai
Автор

You just gained a subscriber!! Thanks for teaching!

LizyAd
Автор

That's exactly what I was looking for. Thanks!

andriibibik
Автор

Awesome!!! Thank you for making this video!!! :)

benbetterby
Автор

You, sir, now have a new subscriber. Great lesson, thank you!

eyoutube
Автор

love the pokemon reference. ill sub just cus of that. thank u, im still so confused over all this but you helped me a good bit along the way. well explained :)

bryggmastaren
Автор

Awesome explanation! Thank you very much! The explanation with the return()() helped me a lot :D

KiteDuo_CH
Автор

Haha you make these video’s entertaining and educational 👍

caseyspaulding
Автор

you just explained how it is done. but the important thing to know is why is it done this way? wrapping a function using another function, why? what r the benefits?
it seems extra useless step.

halalmeatshophk
join shbcf.ru