I want the output like this :
***
***
***
But my output is coming like this :
*
*
*
*
*
*
*
*
*
Here's my code :
function pattern(n) {
let row = 1;
while(row <= n) {
let column = 1;
while(column <= n) {
console.log("*");
column = column + 1;
}
console.log("\n");
row = row + 1;
}
}
console.log(pattern(3));