Skip to content

Commit

Permalink
code to print the left side triangle
Browse files Browse the repository at this point in the history
Program to print left side triangle
  • Loading branch information
Arunkumar1712 authored Jan 8, 2024
1 parent 429c4c4 commit e6f3864
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pattern left.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//left triangle
var n=5;
var str=""
for(var i=0;i<n;i++){
for(j=0;j<=i;j++){
str+="*";
}
str+="\n";
}
console.log(str);

0 comments on commit e6f3864

Please sign in to comment.