TZinovieva

NxN Matrix JS

Feb 4th, 2023
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function nxNMatrix(n) {
  2.    
  3.     for (let i = 1; i <= n; i++) {
  4.         let buff = '';
  5.             for (let j = 1; j <= n; j++) {
  6.                 buff += n + ' ';
  7.             }
  8.             console.log(buff);
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment