Guest User

NxN Matrix

a guest
Oct 18th, 2019
85
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function printMatrix (n) {
  2.    
  3.     for (let i = 1; i <= n; i++) {
  4.         let row = "";
  5.         for (let i = 1; i <= n; i++) {
  6.             row += n + " ";
  7.         }
  8.         console.log(row);
  9.     }
  10. }
RAW Paste Data