So I saw there was a thread similar to this but it was dealing more with importing other classes into a file. My question is a simple syntax one:
// in a file named “test.js"
if (typeof a != ‘undefined’) document.write(‘a = "’ + a + '”
if (typeof b != ‘undefined’) document.write(‘b = "’ + b + ‘"
if (typeof c != ‘undefined’) document.write(‘c = "’ + c + ‘"
a = 123
var b = 456
if (a == 123) var c = 789
So this is all completely valid JS code and I’ve tried it and it works. However my gutter is littered with warnings about how these lines are all missing semicolons. Not only that, but it tells me that a is not defined and c is defined but never used. I don’t want to turn off warnings like this completely in case I do actually make a mistake later on but they are really annoying right now. Any suggestions?