Using .split(","); to split .csv data into an array whilst in a for loop?

And lines[] is an array that has already read the data from the .csv file
The previous code WOULD work if I replaced 'i' with 0, for example, but I need to split the data for the entire lines[] array.
However, I get the following error message repeatedly: