Skip to content

Instantly share code, notes, and snippets.

@johnfkneafsey
Created November 22, 2016 00:23
Show Gist options
  • Save johnfkneafsey/17a13bb28c5b610b509db93f077d19ca to your computer and use it in GitHub Desktop.
Save johnfkneafsey/17a13bb28c5b610b509db93f077d19ca to your computer and use it in GitHub Desktop.
Wiseperson
function wisePerson(wiseType, whatToSay) {
return 'A wise ' + wiseType + ' once said: "' + whatToSay + '".';
}
/* From here down, you are not expected to
understand.... for now :)
Nothing to see here!
*/
// tests
function testWisePerson() {
var wiseType = 'goat';
var whatToSay = 'hello world';
var expected = 'A wise ' + wiseType + ' once said: "' +
whatToSay + '".';
var actual = wisePerson(wiseType, whatToSay);
if (expected === actual) {
console.log('SUCCESS: `wisePerson` is working');
}
else {
console.log('FAILURE: `wisePerson` is not working');
}
}
testWisePerson();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment