0

I have some JS condition where I use !=0, that means I am looking for a number or string (or any other true value) and not an empty or zero value (jsfiddle: https://jsfiddle.net/hjL4eaht/1/)

if(x!=0){
    // do something
}

So I got a warning because JSHint suggest me to use == to avoid empties, what is absolutely understandable, but I don't need it, so I am disabling it making eqeqeq option to false.

eqeqeq=false

but this is not working, I continue getting these warnings, I think eqeqeq is not the correct option.

The warning says: "Use '!==' to compare with '0'."

how can I disable them?

Thank you!

stramin
  • 2,183
  • 3
  • 29
  • 58

0 Answers0