Last active
August 3, 2017 00:55
-
-
Save ceci21/f418c35284c67c427c23b68ba9c5154e to your computer and use it in GitHub Desktop.
returns a function that console.logs OHOHO, but it multiplies HOHO every time you call it, but it kinda starts to get out of hand if you do it too much
This file contains 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
function sayOho() { | |
var string = 'O'; | |
var i = 1; | |
return function() { | |
for (var k = 0; k < i; k++) { | |
string = string + "HO"; | |
} | |
i = Math.pow(2, i); | |
console.log(string); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment