Closed albseb511 closed 4 years ago
I am glad you've found your own solution that you like better -- that means the book did its job in teaching you! -- but I'm not going to update the book with each person's own approaches. I just presented one suggested solution. Thanks.
Yeah that's fair enough. Just thought of making the example better.
Would it be valuable if I can contribute to different examples in the future? Rather than changing existing ones?
On Tue, 24 Mar 2020, 19:57 Kyle Simpson, notifications@github.com wrote:
I am glad you've found your own solution that you like better -- that means the book did its job in teaching you! -- but I'm not going to update the book with each person's own approaches. I just presented one suggested solution. Thanks.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/getify/You-Dont-Know-JS/pull/1647#issuecomment-603270481, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4YPCYY2MNXE7UH3OVQZQDRJC7M5ANCNFSM4LSNHSXQ .
Once I publish a book (like once it's complete) it's unlikely that I'll change the book just with alternate approach suggestions unless there are legitimate defects. This book was published about a month ago, so it's pretty unlikely anything more than minor fixes will occur.
While I'm writing a book here, suggestions are welcomed.
Yes, I promise I've read the Contributions Guidelines (please feel free to remove this line).
Specifically quoting these guidelines regarding typos:
Please type "I already searched for this issue":
Edition: (pull requests not accepted for previous editions)
Book Title:
scope-closures
Chapter:
apB.md
Section Title:
Suggested Solutions
Topic:
Suggested: Closure (PART 2)
Modified the example for toggle. A bit more compact and uses arguments. I found it a bit more easier, as we are not doing any operations on the array like shift / unshift.