Inspectopedia
 
2024.3

Pointless 'indexOf()' comparison

Warning
New
Last modified: 03 December 2024

Reports unnecessary comparisons with .indexOf() expressions. An example of such an expression is comparing the result of .indexOf() with numbers smaller than -1.