Is something wrong with js?
if(\"hello\".indexOf(\"world\")) { // I forgot to add > -1 here
console.log(\"hello world\");
}
Basically
As it was mentioned only 0 (considering numbers) is equivalent to zero. But yes there is list of things which are equal to false in javascript and those are:
everything else when comapred to false returns false. e.g. -1 == false -> false