Created
March 4, 2021 20:57
-
-
Save alexcrist/d099638cd5d17a3c188c944d3c476ee3 to your computer and use it in GitHub Desktop.
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 numberDoubler(num) { | |
let outputNum = num; | |
while (outputNum < 100) { | |
outputNum = outputNum * 2; | |
} | |
return outputNum; | |
} | |
function stringRepeater(str) { | |
let outputStr = str; | |
while (outputStr.length < 10) { | |
outputStr += str; | |
} | |
return outputStr; | |
} | |
function makeDivisible(x, y) { | |
let outputX = x; | |
while (outputX % y !== 0) { | |
outputX++; | |
} | |
return outputX; | |
} | |
module.exports = { | |
numberDoubler, | |
stringRepeater, | |
makeDivisible | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment