I am working with Titanium, my code looks like this:
var currentData = new Array(); if(currentData[index]!==\"\"||currentData[index]!==null||currentData[ind
If you use underscore.js then these type of null and undefined check are hidden by the library.
So your code will look like this -
var currentData = new Array(); if (_.isEmpty(currentData)) return false; Ti.API.info("is exists " + currentData[index]); return true;
It looks much more readable now.