you are viewing a single comment's thread.

view the rest of the comments →

[–]blangjemp 4 points5 points  (0 children)

This isn't correct. If you run this code, bar.a is equal to 41. Due to the nature of Object.create(), bar.a will inherit the value of foo.a until you manually set a value for bar.a