Answers for "get column from 2D array javascript"

0

get column from 2D array javascript

// 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]; });
Posted by: Guest on October-24-2021

Code answers related to "get column from 2D array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language