JavaScript Functions
Functions are an integral part of many programming languages, and JavaScript is not an exception. In JavaScript, fu...
For further actions, you may consider blocking this person and/or reporting abuse
great
Thank you!
Excellent! And you avoided mentioning
monad
and scaring away the fainthearted.Good job
Thanks a lot 😀
I still struggle with HoF posts which don't mention closure. I either misunderstand closure concept or HoF purpose. Any guidance?
Hey Thomas, thanks for reading. I kept out closure intentionally in this post. Closure and HoF are integral to each other but when I started explaining it I wanted to focus on the simlicity of understanding HoF with simple examples. The next in the line is to go closure and currying to complete the triology 😀.
Well done. However, I would like to know more about the difference between callback and HOF
Thank you! I have done a detailed explanation of the callback here: freecodecamp.org/news/javascript-c...
So, is HOF is the same concept as Decorator as in python?
And if it's OOP, can this be called some kind of inheritance?
I'm not aware much on Python so can not confirm about it but coming to the OOPs part, it is not exactly inheritance. Inheritance is where we get pass the parent traits to child and also enhance them.
HoF is more to do with function compositions. You create function compose to another, the the output can be composed to another one, and so on.
JS has landed not that long ago decorators for OOP (mostly) like Python does.