Questions tagged «titanium-mobile»

18
如何检查JavaScript中是否存在数组元素?
我正在使用Titanium,我的代码如下所示: var currentData = new Array(); if(currentData[index]!==""||currentData[index]!==null||currentData[index]!=='null') { Ti.API.info("is exists " + currentData[index]); return true; } else { return false; } 我正在将索引传递给数组currentData。我仍然无法使用上述代码检测到不存在的元素。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.