Eloquent JavaScript Reading Group _ Chapter 5!

preview_player
Показать описание
We're picking up where we left off with functions and going in to Higher Order Functions with chapter 5. If you want an idea of what we covered last time, you can watch the screencast. It's helpful if you've read through this chapter of Eloquent, but not required.

Рекомендации по теме
Комментарии
Автор

spent a lot of time getting distracted by useless lookups, but still nice that the vid is there for reference

bijankhadembashi
Автор

Can you plz explain the below code of Chapter 5??.. It's in the page of 96 of that book!!.. In the below code, "reduce" had 3 arguments at the first place but in the console, why they put only 2 values??.. Why the 3rd value missing there??... TIA!!

function reduce (array, combine, start ) {
var current = start ;
for (var i = 0; i < array . length ; i++)
current = combine ( current, array [i]);
return current ;
}
console .log( reduce ([1, 2, 3, 4], function (a, b) {
return a + b;
}, 0));

//-> 10

navaarunbhattacherjee
visit shbcf.ru