Is something wrong with js?
if("hello".indexOf("world")) { // I forgot to add > -1 here
console.log("hello world");
}
Basically if(-1)
is true. How is this possible? It took me a whole day to fix this. Is there a list available where these kind of things are listed? Or tools available to catch things like these.