I have the following function:
function getId(a){
var aL = a.length;
for(i = 0; i < aL; i++ ){
return a[i][2].split(":", 1)[0];
}
}
and when using console.log()
within the function instead of return
I get all of the values in the loop, and the same goes for document.write
. How can I access these values as a string for use in another section of my code?
Thank you in advance.