getify / Functional-Light-JS

Pragmatic, balanced FP in JavaScript. @FLJSBook on twitter.
http://FLJSBook.com
Other
16.6k stars 1.96k forks source link

Update ch7.md #198

Closed MananTank closed 3 years ago

MananTank commented 3 years ago

Replace Object.setPrototypeOf with Object.create for setting prototype of newly created object

getify commented 3 years ago

The purpose of those two lines is to show what's going on under the covers. Using Object.create(..) is shorter (and more efficient), but less illustrative.