Jason Antic Retweeted Gary Bernhardt
javascript is the Ralph Wiggum of programming languages. "I'm helping!"https://twitter.com/garybernhardt/status/1063880211643609088 …
Jason Antic added,
Gary Bernhardt @garybernhardt
Someone please explain to me why #2 is a syntax error and why #3 is calling join on undefined.
> eval("[].join(); [].join()")
''
> eval("[].join()\n[].join()")
SyntaxError: Unexpected token ]
> eval("[].join()\n[1].join()")
TypeError: Cannot read property 'join' of undefined
Show this thread
2:28 PM - 18 Nov 2018
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.