You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shrugs. This must have changed at some point. It used to silently ignore the attempt to assign to the read-only string when I wrote the book. I think what may have changed is the treatment of values that are passed through as this via .call(..).
Note that the section in question is accurate in that it says Array.prototype.reverse(..)does not work. The manner in which it does not work is what has changed.
https://github.com/getify/You-Dont-Know-JS/blob/master/types%20%26%20grammar/ch2.md#strings
There's a code in this section that tries to use the Array.prototype.reverse function to reverse a string.
The comment says that it returns a String object wrapper. However, running it on Chrome 66 (and maybe other browsers too) gives a TypeError.
The text was updated successfully, but these errors were encountered: