Closed ghazpar closed 7 years ago
Hi @ghazpar! Semicolons are not required for valid javascript, and the code actually will run as-is in the browser thanks to Automatic Semicolon Insertion. Since semicolons aren't required, the use of them turn mainly into a style preference.
It's just my preference, but why waste keystrokes on unnecessary semicolons 😄 The awesome people over at standardjs have the same idea too which this project uses.
Hope this helps!
Well the code is not running for me in chrome. I will try again...
Any stack traces or error messages printed to the console would definitely be helpful in resolving the issue
Sorry, my mistake. I misinterpreted the error messages, thinking it was linked to the missing semicolons (I had noticed that semicolons were sometime optional, but never measured the extent of it).
My problem was linked to dependancies; I was assuming that tab-elect was standalone. You may want to consider adding them to your documentation!
BTW, I disagree that leaving out semicolons is a good idea. I think js is horrible enough, no need to make it worse by adding ambiguities.
I'll update the README to reflect this. Thanks for the suggestion!
I am looking with interest at your code, but it is not valid javascript syntax; it does not execute as is. Am I expected to add all of the missing semicolons??? What is the point?