Created
August 23, 2017 01:16
-
-
Save claudiainbytes/a4f8361225787d85daf4d948347255b9 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
| /* | |
| * Programming Quiz: Laugh it Off 2 (5-2) | |
| */ | |
| // declare your function | |
| // then, call it! | |
| // print the output with console.log | |
| function laugh(num){ | |
| var x = 1; | |
| var output = ""; | |
| while ( x <= num ){ | |
| output += "ha"; | |
| x++; | |
| } | |
| return output + "!"; | |
| } | |
| console.log(laugh(3)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment