I was validating some JS using JSLint, and it returned the error:
on the code:Problem at line 15 character 45: Expected '{' and instead saw '$$n'.
I was under the impression that curly brackets were not needed for one-line "if" statements, and I've long done things this way. The ECMA specs (pp 71-72) shows it in the format that I used if ( Expression ) Statement else Statement, and I've never had any problems until I used this validator (which comes recommended).Code:else if($$gauge==$$gauge.match($$numOverZero)) $$n=1-parseInt($$gauge.charAt(0),10);
What's the deal-y-o?![]()


Reply With Quote

Bookmarks