loading...

re: Mastering Hard Parts of JavaScript: Callbacks I VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks for picking that up! Should be fixed now 😀
 

if (Object.keys(arguments).length > 2) {

I think you can just use arguments.length. Cheers!

better yet, typeof initialValue !== 'undefined' so you avoid touching arguments at all

initialValue can be undefined

yes...but accum = initialValue loses its purpose if it is.

Code of Conduct Report abuse