I want to return multiple lines (one line each time the for-loop goes around), but it only returns the first line. I tried to write a function just to return the line, but I got errors with it because I don't know where to put it.
What's a good way of doing this?
for (var i = 0; i < testArray.length; i +=3) {
    geometry.vertices.push(
        new THREE.Vector3( testArray[i], testArray[i + 1], testArray[i + 2] ),
        new THREE.Vector3( testArray[i + 3], testArray[i + 4], testArray[i + 5] ));
    var line = new THREE.Line(geometry, material);
    return line;
    // or if using function, returnLine(line);
}
Attempted function:
function returnLine(line) {
    return line;
}
 
     
    