Skip to content

Commit 320e414

Browse files
author
Nita1001
committed
done ninja
1 parent 450f2f2 commit 320e414

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

exercise9/ex9.4.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
const print = (n) =>{
77
let str = [];
88
for(let col = 0; col < n ; col++){
9-
for(let row = 0; row <= col; row++){
10-
str +='#'
9+
for(let row = 0; row < n; row++){
10+
if(row > col)
11+
{
12+
str +=' ';
13+
} else{
14+
str +='#';
15+
}
1116
}
1217
str +='\n';
1318
}

0 commit comments

Comments
 (0)