Created
December 26, 2016 07:58
-
-
Save prashanth-g/bae92bdd80cd5521bdf56e9e5d368ad4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Stars(n) { | |
| for(var i=1; i<=n;i++){ | |
| var s = ""; | |
| for(var j=0; j<n-i;j++) { | |
| s += " "; | |
| } | |
| var st =""; | |
| for(var k=0; k<2*i-1;k++) { | |
| st +="*"; | |
| } | |
| console.log(s+st); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.