Skip to content

Instantly share code, notes, and snippets.

@liseferguson
Created March 9, 2018 23:45
Show Gist options
  • Save liseferguson/3ab1ac3c62ab3b10b16b39b3ac0346da to your computer and use it in GitHub Desktop.
Save liseferguson/3ab1ac3c62ab3b10b16b39b3ac0346da to your computer and use it in GitHub Desktop.
Shouter function (returns all caps)
function shouter(whatToShout) {
return `${whatToShout.toUpperCase()}!!!`;
}
/* From here down, you are not expected to
understand.... for now :)
Nothing to see here!
*/
// tests
function testShouter() {
const whatToShout = 'fee figh foe fum';
const 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