Комментарии:
This is better than Netflix.
Ответитьwhy i dont understand this reduce at all :(
Ответитьwhat extention are you using to see the values live?
ОтветитьCan't believe!! You literally have summed up almost everything Js in one video.
ОтветитьHay Jack, can you tell me how are your printing array values just before it?
ОтветитьYou are too good Jack!! The way you have compared all the array functions with reducer. Reduce indeed can replace most of the array functions which helps in grasping the concepts. Thanks. What vs extension you are using to see the output on the vscode screen?
ОтветитьI wasn't confident about reduce method till now.. thanks much for the video..
Ответитьi think reduce is not the mother of all array method it is here mother in low >>>> its complicated
ОтветитьNo doubt reduce is mother of all but it is also mother of all complex looking code too! :)
ОтветитьWhat is that extension, that gives output right after function definition?
ОтветитьWhich extension did you get for showing that each step is going on under the hood?
ОтветитьCome on, Jack! You are a blessing for all programmers. Thank you so much, I think I'm about to finish all of your videos.
ОтветитьI love your teaching even more than your music. Thanks Macklemore!!
Ответить100% coverage of reduce functionality.
Thanks a lot 👍
Reduce is my favourite method for arrays. So powerful especially when initializing an object but at same time looping through the array. Love the series!
Ответить잭 형
최고!
The problem with reduce is that unless the function inside is extremely simple, readibility is sacrificed.
You are better off using for...of or for...in
Great video as always!
Ответитьthe best ever
ОтветитьGreat Content, keep up!
ОтветитьThank you for another awesome video!
Ответитьabsolutely complete stuff !! keep going !
ОтветитьGreat video man!
ОтветитьGreat comparison examples! "Mother" will be proud! :D
ОтветитьNice video Jack as usually! As you said reduce should be used with caution, don't just use it everywhere because it's cool. Good example with lookup, complexity with for-of is O(n) but with reduce you will get O(n^2) .
ОтветитьHi, Jack. On your last example (the reduce hack), two questions:
1. How come that we are also getting the last id resolved? When we are on index 0, value 10, we are awaiting for Promise.resolve() defined as the starting accumulator, at index 1 and value 20, we are awaiting for resolved id 10 returned from first iteration and on the last index 2 with value 30 we are awaiting for the resolved id 20 returned by the promise from the second iteration. So where is the await for the last Promise executed? Does reduce use iterators behind the hood, and awaits the last promise from the accumulator when the iterator has value: undefined and done: true?
2. What is the difference of initialising the accumulator with new Promise() or Promise.resolve()? Also in this chapter, whats the difference between resolving a promise with provided resolve method (from the parameters) and using the static method of the Promise class?
Thanks a lot!
Amazing Jack, Keep it up you are definitely the leader of JS/TS/React/Frontend community.
ОтветитьAmazing !
ОтветитьWow that async reduce hack sure is smart!! Great video as always!!
ОтветитьPerfect video for Reduce...the mother of all functions 😅
ОтветитьReduce in JavaScript is actually really easy because the parameters arent typed. You can just throw anything in for the identity and then change it however you want on each iteration.
I like using reduce to convert and array of objects to an object with specific keys.
How reduce performs when compared with other array methods and regular for loop?
ОтветитьGreat content and explanation sir as per usual
ОтветитьOne of your typescript challenges where to do everything other methods do with reduce method, I was blown away when I learned it
Ответить