Domande taggate «titanium-mobile»

18
Come verificare se l'elemento array esiste o no in JavaScript?
Sto lavorando con Titanium, il mio codice è simile al seguente: 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; } Sto passando un indice all'array currentData. Non riesco ancora a rilevare un elemento inesistente usando il codice sopra.
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.