Hacker News new | ask | show | jobs
by zequel 4467 days ago
Most web browsers (if you're running this code in a web browser), will do ASI (automatic semicolon insertion).

http://jsfiddle.net/CxUXh/ works fine in Chrome, changing the console.log to an alert.

Not that I'm advocating omitting semicolons!

1 comments

Interesting - your jsfiddle exhibits broken behaviour (alerting 'garrr') on my browser - chrome 33.0.1750.152. I believe I'm fairly up to date.
You're correct, I thought that was expected behavior, my mistake. TBH though, I'm surprised ASI didn't fix the problem, I'll have to look at the rules for insertion again.