Created
October 16, 2014 02:46
-
-
Save chikoski/125f1c5c2c028612a63b 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
| var nSFC = function(n){ | |
| var message = ""; | |
| var counter = 0; | |
| while(counter < n){ | |
| message = message + "SFC "; | |
| counter = counter + 1; | |
| } | |
| return message; | |
| }; | |
| var sfcPyramid = function(n){ | |
| var output; | |
| var row = 1; | |
| while(row <= n){ | |
| output= nSFC(row); | |
| console.log(output); | |
| row = row + 1; | |
| } | |
| }; | |
| sfcPyramid(3); | |
| sfcPyramid(10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment