marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.03k stars 799 forks source link

3rd edition, Chapter 5, Abstracting repetition - unnecessary parameter #326

Closed ghost closed 6 years ago

ghost commented 6 years ago

http://eloquentjavascript.net/3rd_edition/05_higher_order.html#c_p03rPqGmn9 Anonymous arrow function doesn't use parameter i from repeat function. let message = "Wow"; repeat(5, i => { message += "!"; }); console.log(message); // → Wow!!!!! Maybe it would be more clearer repeat(5, () => { ?

Thank you. I very much appreciate all your efforts.

marijnh commented 6 years ago

See my comment on #328