Skip to content

Commit b08ff27

Browse files
committed
feat(L-B): Right triangle star pattern code
1 parent c842933 commit b08ff27

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const RightTriangleStarPattern = (size) => {
2+
for (let y = 0; y < size; y++) {
3+
let temp = ''
4+
5+
for (let x = 0; x <= y; x++) {
6+
temp += '*'
7+
}
8+
9+
console.log(temp)
10+
}
11+
}
12+
13+
RightTriangleStarPattern(5)

0 commit comments

Comments
 (0)