Well, I'm having some problems with the following code snippet:
alert(lineOut[i].trim() + " - - " + lineOut[i + 1].trim());
Uncaught TypeError: Can not read property 'trim' of undefined (...)
The array lineOut
is a dynamically populated array, which at the time of execution of the above excerpt has the following values:
lineOut = ["6", "Comentario"];
Can anyone give me a glimpse of why this problem is happening?