Skip to content

Instantly share code, notes, and snippets.

@AppMkrATL
Created February 13, 2018 13:59
Show Gist options
  • Save AppMkrATL/4869c2a3477d0ec33ffd75b90a616188 to your computer and use it in GitHub Desktop.
Save AppMkrATL/4869c2a3477d0ec33ffd75b90a616188 to your computer and use it in GitHub Desktop.
2_Shouter Generator
function shouter(whatToShout) {
// your code here
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