A silly debate that rages just as hard as “tabs vs spaces” is “semicolons or not” in JavaScript. Generally, the answer is “use an automatic formatting tool so you don’t have to think about it”. But if you happen to be on the “no semicolons” side, it’s interesting to note that it can cause confusing bugs sometimes. Thomas Steiner found a fun one:
console.log()
(function(){})Code language: JavaScript (javascript)
Just a little log statement followed by an IIFE, right? Click over to see what actually happens.