js有问题吗?
if("hello".indexOf("world")) { // I forgot to add > -1 here console.log("hello world"); }
基本上if(-1)是真的.这怎么可能?我花了一整天才解决这个问题.是否列出了列出这些类型的列表?或者可以用来捕捉这些东西的工具.
if(-1)
javascript truthiness
javascript ×1
truthiness ×1