|
|
|
|
|
by nilved
4196 days ago
|
|
When you use `console.log` that way it gets `this` set to `null`. When you call `console.log("hello")`, `this` is set to `console`. Your code would work if you set an explicit `this`. n.forEach(console.log.bind(console));
I don't think there's any reason for this library to exist after you understand `this` semantics but I may be missing something.e: was, in fact, missing something. Apologies for the disparaging comment, see replies. |
|