Hope this question makes sense:
I'm attempting to select a random item from an array saved in a CSV. The assignment is to randomly select 1 line from the song saved in the array and make that line uppercase. However, I'm having a hard time randomly selecting the line.
Here is what I got:
var pickALine = function()
{
var randomLine = parsed_text[Math.floor(Math.random() *
parsed_text.length)];
return randomLine;
};
console.log(pickALine());
just trying to print the line for testing
It does print, but the entire array, not just one line.