javascript-allonge-six icon indicating copy to clipboard operation
javascript-allonge-six copied to clipboard

Ch.1 "Copy on Write", issues with the copy function.

Open montanonic opened this issue 9 years ago • 1 comments

I'm new to JS so it's entirely possible I'm just not understanding how the copy function should work. However, in my Firefox browser (which had no issues with any example up to this point in the text), copy does not seem to work at all.

Here's a code snippet displaying the issue:

>> parentList
<- Object { first: "one!", rest: Object }
>> copy(parentList) // does not have any result
>> var thing = copy(parentList);
>> thing
<- undefined

montanonic avatar Jan 31 '16 20:01 montanonic

I'm not sure what's happening in your browser, but here's an es6fiddle demonstrating the copy-on-write code:

http://www.es6fiddle.net/ika6lvz5/

raganwald avatar Feb 05 '16 21:02 raganwald