As I told you... For each video that I will watch I will comment and like the video. Its the most basic support that we can give to you. What I like about your videos is that they are somehow "long' and I think that programming videos should be not short. We are learning concepts here, and concepts are just theory you need to dive deep to understand in order to form the mental pattern. So keep up the good work and thank you for what you are doing for us.
Hi Dave, I've a doubt here, so this lecture starts as A higher order function does at least ONE of the following: 1) takes one or more functions as an argument (parameter) 2) returns a function as its result. so but the functions written in this lecture are taking post obj as argument and again doing some computation and returning again an arg which is obj. so please help me understand this part. thank you for the lectures though
Hi Dave, great video as always! I understand the map method doesn't mutate the original array. After I saw the example you provide (return id * 10), I was thinking what if I want to update id to id * 10, and return a new array. How can I do that? Create a new array and push the new ids in? Thank you for your time!
From what you are describing, I think your solution with creating a new array and pushing in the new id values would work. As you noted, map would not mutate the original values like you are wanting to.
Const people = [ { name: 'siddiq', age: 20} , { name: 'anas', age: 19}] Const arr = people.reduce((acc, curr) => acc.push(curr.age), []) It is not working. What i want is to creare an array with only ages...??
@@DaveGrayTeachesCode okay thank you sir. But could you please explain why that thing is giving an error. It is constantly saying acc.push is not a function ( or something like that)?
Hello Prasanth, you may have already asked in my Discord, but if not, here is a link: discord.gg/neKghyefqh I'm getting ready to check questions there now.
As I told you... For each video that I will watch I will comment and like the video. Its the most basic support that we can give to you. What I like about your videos is that they are somehow "long' and I think that programming videos should be not short. We are learning concepts here, and concepts are just theory you need to dive deep to understand in order to form the mental pattern. So keep up the good work and thank you for what you are doing for us.
Thank you for the support!
This is best explanation of HOF I found on YT till date, thanks a ton for your efforts. God bless you.
You're welcome! 💯
We liked how you showed things and tie them together , Hope you can continue making these kind of videos
Thanks!
bro this was really well explained, thank you! also appreciate the clean and modern js
Thank you! 💯
Thank you so much!💛
Welcome!
Thanks for the explanations, I really needed this 🙏🏻
You're welcome!
Very clear, we keep going forward. Thank you again Dave.
Keep making that daily progress! 🚀
A great tutorial on Higher Order Functions. Beautifully explained. Thank you, Dave
{2022-03-09}
Thank you, Paresh!
This was such a top notch tutorial! Thanks for providing MDN links too, I used it for reduce( ) and accumulator concept is clear!
Glad it was helpful!
Thanks grey for this beautiful video. short and precise
You're very welcome! 💯
As usual! free and high quality video. Thank you so much Dave 🙏🏽
I wonder if I can have or play with the files you are demonstrating with 😅
It's good to recreate these files / examples on your own :)
@@DaveGrayTeachesCode Thank you, I actually did just that 😅
Hi Dave, I've a doubt here, so this lecture starts as
A higher order function does at least ONE of the following:
1) takes one or more functions as an argument (parameter)
2) returns a function as its result.
so but the functions written in this lecture are taking post obj as argument and again doing some computation and returning again an arg which is obj. so please help me understand this part. thank you for the lectures though
All of these functions take an anonymous function as their argument. Post is the parameter of the anonymous function.
If I understand, that was why the reduce function could take two argument (sum, post)
thanks for this tutorial
Hi Dave, great video as always! I understand the map method doesn't mutate the original array. After I saw the example you provide (return id * 10), I was thinking what if I want to update id to id * 10, and return a new array. How can I do that? Create a new array and push the new ids in? Thank you for your time!
From what you are describing, I think your solution with creating a new array and pushing in the new id values would work. As you noted, map would not mutate the original values like you are wanting to.
Const people = [ { name: 'siddiq', age: 20} , { name: 'anas', age: 19}]
Const arr = people.reduce((acc, curr) => acc.push(curr.age), [])
It is not working. What i want is to creare an array with only ages...??
After you define your people array, try this: people.map(person => person.age);
After you define your people array, try this: people.map(person => person.age);
@@DaveGrayTeachesCode okay thank you sir. But could you please explain why that thing is giving an error. It is constantly saying acc.push is not a function ( or something like that)?
@@siddiqahmed3274 You don't want to use array.push () inside of map. map() already returns a new array.
im facing error in importing the json data saying "Cannot use import statement outside a module"..pls help me
You will need to indicate the script is a module. From lesson 24: th-cam.com/video/Q3SBogjUfMk/w-d-xo.html
could you please do a javascript full project like you did with html and css
or even a html, css and javascript full project
you could even use the little taco shop
I have a playlist on my channel with Vanilla JavaScript projects: th-cam.com/play/PL0Zuz27SZ-6PA3nkkEAr91n4bK-NunwPU.html
dave i need one help dave can you please provide your email i wukk send error screenshot for you please help me dave
Hello Prasanth, you may have already asked in my Discord, but if not, here is a link: discord.gg/neKghyefqh I'm getting ready to check questions there now.