📜  从二维数组 javascript 代码示例中获取列

📅  最后修改于: 2022-03-11 15:02:05.907000             🧑  作者: Mango

代码示例1
// a two-dimensional array
var two_d = [[1,2,3],[4,5,6],[7,8,9]];

// take the third column
var col3 = two_d.map(function(value,index) { return value[2]; });