[basic] working while
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
export function buildPiramid(n: number) {
|
||||||
|
let res = "";
|
||||||
|
let counter = 0;
|
||||||
|
|
||||||
|
|
||||||
|
while (counter < n) {
|
||||||
|
res += "#"
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
buildPiramid(7)
|
||||||
Reference in New Issue
Block a user