Closed sdwvit closed 3 years ago
Nice example of interpretator stupidness 👯 (taken from http://lurkmore.to/Javascript )
function foo(){} foo() [1,2,3].map(console.log.bind(console)) // Uncaught TypeError: undefined is not an object
however this works: function foo(){} foo() ;[1,2,3].map(console.log.bind(console))
Looks like a duplicate of this example: https://github.com/denysdovhan/wtfjs#tricky-return
That's why I close this. Thanks for reporting!
Nice example of interpretator stupidness 👯 (taken from http://lurkmore.to/Javascript )
function foo(){} foo() [1,2,3].map(console.log.bind(console)) // Uncaught TypeError: undefined is not an object
however this works: function foo(){} foo() ;[1,2,3].map(console.log.bind(console))