When I am using console.log to print the array length , it returns 0 .
But in the console , if I write txt.length it returns the actual length (i.e 60 in my case) . For this reason I can't iterate through the txt array.
var txt;
function preload() {
txt = loadStrings("DataProcess/outData.txt");
console.log(txt);
console.log(txt.length);
}
loadStringsfunction? As you're passing a path to a file to that function, it badly seems, that there's some asyncronous action taken in the function.loadStrings()here?