Created
August 27, 2014 11:55
-
-
Save sawant/9fac968f4c31c78cff4a to your computer and use it in GitHub Desktop.
JavaScript ASCII Right Triangle
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
/* | |
http://eloquentjavascript.net/02_program_structure.html | |
Write a loop that makes seven calls to console.log to output the following triangle: | |
# | |
## | |
### | |
#### | |
##### | |
###### | |
####### | |
*/ | |
for (hash = "#"; hash.length <= 7; hash += "#") | |
console.log(hash); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment