Transpose column to row (CSV)

by Anton

JavaScript

const column = ` 19.00   
 21.00   
 21.00   
 21.00   
 21.00   
 21.00   
 20.00   
 21.00   
 22.00   
 20.00   
 21.00   
 18.00   
 21.00   
 20.00   
 23.00   
 18.00   
 22.00   
 22.00   
 21.00   
 22.00   
 20.00   
 21.00   
 21.00   
 17.00   
 22.00   
 20.00   
 20.00   
 20.00   
 21.00   
 21.00   
 22.00   
 21.00   
 20.00   
 22.00   
 21.00   
 16.00   
 22.00   
 20.00   
 20.00   
 20.00   
 22.00   
 19.00   
 23.00   
 21.00   
 21.00   
 23.00   
 20.00   
 18.00   
 21.00   
 20.00   
 22.00   
 20.00   
 20.00   
 21.00   
 23.00   
 21.00   
 22.00   
 21.00   
 21.00   
 18.00   
 19.00   
 20.00   
 23.00   
 20.00   
 21.00   
 22.00   
 22.00   
 22.00   
 22.00   
 20.00   
 21.00   
 21.00   
 19.00   
 20.00   
 23.00   
 20.00   
 21.00   
 22.00   
 22.00   
 22.00   
 22.00   
 20.00   
 21.00   
 21.00`;

const row = column.split('\n').join(',');
console.log(row);