Skip to content

Instantly share code, notes, and snippets.

@sawant
Created August 27, 2014 11:55
Show Gist options
  • Save sawant/9fac968f4c31c78cff4a to your computer and use it in GitHub Desktop.
Save sawant/9fac968f4c31c78cff4a to your computer and use it in GitHub Desktop.
JavaScript ASCII Right Triangle
/*
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