Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array column

    //get column in javascript... 

	function getCol(matrix, col){
       var column = [];
       for(var i=0; i<matrix.length; i++){
          column.push(matrix[i][col]);
       }
       return column; // return column data..
    }

    var array = [new Array(20), new Array(20), new Array(20)]; //..your 3x20 array
    getCol(array, 0); //Get first column
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #column
ADD COMMENT
Topic
Name
8+6 =