I'm making my way through Professional Javascript for Web Developers and found a discrepancy.

30 views
Skip to first unread message

Avjinder Sekhon

unread,
Jun 17, 2017, 3:15:59 AM6/17/17
to Zakas Books
In Chapter 3, Language Basics, Understanding Argument section, Page 82,  it's mentioned that if any value in the arguments object is modified, it's also reflected in the named argument. But, if the value of the named argument is modified, the corresponding value is not changed in the arguments object.

However, this is not the case now as I've tested it on multiple browsers. The values in the named arguments and the arguments object are being kept in sync, no matter which one is modified. Can you let me if that's true or not.
Also, while I love your book so far, do you think it's appropriate to use this to learn Javascript now, as I assume many things in the language must have changed since the book was published?

Nicholas Zakas

unread,
Jun 17, 2017, 11:57:20 AM6/17/17
to Zakas Books
The arguments object and named parameters are kept in sync in nonstrict mode. In strict mode, they are decoupled as described. This is mentioned on the errata page: http://www.wrox.com/WileyCDA/WroxTitle/Professional-JavaScript-for-Web-Developers-3rd-Edition.productCd-1118026691,descCd-ERRATA.html

The book is fine to learn from, everything is still relevant aside from the E4X chapter. I'd suggest following up by reading Understanding ECMAScript 6 to get the newer parts covered.
--
You received this message because you are subscribed to the Google Groups "Zakas Books" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zakasbooks+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Avjinder Sekhon

unread,
Jun 17, 2017, 12:16:58 PM6/17/17
to Zakas Books
Thank you for replying so quickly. Loving the book btw. Thanks.
Reply all
Reply to author
Forward
0 new messages