Skip to content

Instantly share code, notes, and snippets.

@ir-g
Last active November 17, 2015 14:08
Show Gist options
  • Save ir-g/36723f5daa60965a2685 to your computer and use it in GitHub Desktop.
Save ir-g/36723f5daa60965a2685 to your computer and use it in GitHub Desktop.
Nested loop tasks
linelimit = 10
charArr = []
for x in [1..linelimit]
z = ""
for y in [1..x]
z+="*"
charArr.push z
console.log " *"
for i in charArr
buf1 = i
bufLen = linelimit - buf1.length
bufLn = []
bufLn.push buf1
bufLn.push "*"
bufLn.push buf1
mm = bufLn.join("")
#console.log bufLen
for iii in [0..bufLen]
#console.log "iii called"
mm = " " + mm
console.log mm
console.log " |____|"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment