Skip to content

Instantly share code, notes, and snippets.

@naturallucky
Last active January 13, 2022 07:12
Show Gist options
  • Save naturallucky/a46a6f53bb0aa88b1d1fae3d7b3f868c to your computer and use it in GitHub Desktop.
Save naturallucky/a46a6f53bb0aa88b1d1fae3d7b3f868c to your computer and use it in GitHub Desktop.
function outputDblAry(dblArray) {
const lineList = dblArray.map(cell => cell.join(','));
const dblAryStr = lineList.join('\n');
return dblAryStr;
};
let m = [[1,2,3],[4,5,6]];
let n = outputDblAry(m);
console.log(n);
@naturallucky
Copy link
Author

output 2-dim array as csv format

2次元配列を文字列で出力

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment