I'm running JSLint on a project and I'm hitting this error:
Expected exactly one space between
}
andelse
On this block of code:
// Check for the existance of the file created by firstrun.js
if (runOnce.exists) {
window.location = 'app:/core/firstrun.html';
}
// Check for version info
else if (!versionInfo.exists) {
window.location = 'app:/core/createVersion.html';
}
The // Check for version info
line is obviously causing the problem; but where would Crockford have me put this comment?
I could obviously change the else if
to an if
since the first if
contains a redirect; but I have other commented if/else if/else
's not containing redirects.