I'm using jslint.com to validate some functions and came across the error:
"A leading decimal point can be confused with a dot"
The line which triggered the error is as follows:
if ( myvar = .95 ){
How do I correct it?
Easy, put a zero before the dot. I guess JSLint complains because the dot is also used for object properties so it can be confused. Plus you're missing an equals, but in JS is recommended to use triple equals:
if (myvar === 0.95) { ... }
Now JSLint won't complain anymore.