DEV Community

loading...

Discussion on: What’s your alternative solution? Challenge #40

Collapse
hayashiay profile image
hayashi-ay

I just changed for-loop to Array#map.

function csvToArray(data)
{
    return data.split("\n").map( row => row.split(";") );
}
Forem Open with the Forem app