So I am using Webstorm IDE for some JavaScript and I believe it uses JSLint to inspect the code. I have a bunch of variable initializer is redundant
warnings. I can't find anything about what it exactly means in terms of what I need to fix.
Example:
function calcPayNow(){
var payNowVal = 0;
--snip---
payNowVal = (Math.round(tec * x) - Math.round(allpmts * x)) / x;
--snip--
}
It means that there is no purpose to assigning 0 because it is never used before you assign a different value.
I would change it from:
var payNowVal = 0;
--snip---
payNowVal = (Math.round(tec * x) - Math.round(allpmts * x)) / x;
to
--snip---
var payNowVal = (Math.round(tec * x) - Math.round(allpmts * x)) / x;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With