Last active
November 17, 2015 14:08
-
-
Save ir-g/36723f5daa60965a2685 to your computer and use it in GitHub Desktop.
Nested loop tasks
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
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