Comments (2)
The call
method is of the following form
function.call(thisArg, arg1, arg2, ...)
The first argument is the context, and the next arguments are an optional coma separated values of the params passed to the function
hence in this case the context is accumulator
as this can be the starting value or any value (array, object, string, number) for that reason, the next argument i.e accumulator, this[index]
are actually the parameters to the reduce function.
from js-vault.
I am not sure how I missed the "call" there. I think I just looked at my trial (direct function call) and jumped the gun. Only thing in my favour is this is my first ever reported issue in github. Ha ha. Closing.
from js-vault.
Related Issues (10)
- Implement Promise.all points to Array.flat implementation page HOT 2
- Array.map - why is there a element exists check? HOT 2
- Implement Promise Polyfill HOT 2
- Explain IIFE with an example HOT 9
- Add a contributors section with Twitter / Github Ids HOT 3
- Implement the pipe function HOT 5
- Promisify a function HOT 3
- Event Dispatcher Implementation HOT 6
- Broken run button (editor)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-vault.