Created
October 13, 2016 10:57
-
-
Save CodeSigils/c2a67875039be8a6fbefc6cc25d815a0 to your computer and use it in GitHub Desktop.
Shouter
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 shouter(whatToShout) { | |
return whatToShout.toUpperCase() + '!!!'; | |
} | |
// tests | |
function testShouter() { | |
var whatToShout = 'fee figh foe fum'; | |
var expected = 'FEE FIGH FOE FUM!!!'; | |
if (shouter(whatToShout) === expected) { | |
console.log('SUCCESS: `shouter` is working'); | |
} | |
else { | |
console.log('FAILURE: `shouter` is not working'); | |
} | |
} | |
testShouter(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment