ivapopova

triangle_matrix_array_demo.js

Jan 22nd, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. let matrix = [
  2. [1,2,3],
  3. [4,5],
  4. [6]
  5. ];
  6.  
  7. for(let i=0; i<matrix.length; i++){
  8. for(let j = 0; j<matrix[i].length; j++){
  9. console.log( matrix[i][j] ); //1
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment