SHARE
TWEET

NxN Matrix

a guest Oct 18th, 2019 82 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top