funjs / book-source

The example source code for the book Functional JavaScript by Michael Fogus, published by O'Reilly
Other
349 stars 101 forks source link

Error on page 32 #6

Closed DannyMoerkerke closed 10 years ago

DannyMoerkerke commented 10 years ago

There is an error on page 32. It is stated that the following function returns the global Window object, but it returns the object b:

var bFunc = function () { return this; } var b = { name: "b", fun: bFunc };

b.fun()

console.log(b.fun()); gives:

Object {name: "b", fun: function}

joyrexus commented 10 years ago

You might want to consider submitting this to the book's official errata list.

eschwartz commented 10 years ago

darn, someone already beat me to it :p

I see this listed on the Confirmed Errata page you linked to, so you can close this issue.