Guest User

Untitled

a guest
Jul 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function wisePerson(wiseType, whatToSay) {
  2. return `A wise ${wiseType} once said: "${whatToSay}".`;
  3. }
  4.  
  5. function testWisePerson() {
  6. const wiseType = 'goat';
  7. const whatToSay = 'hello world';
  8. const expected = 'A wise ' + wiseType + ' once said: "' + whatToSay + '".';
  9. const actual = wisePerson(wiseType, whatToSay);
  10. if (expected === actual) {
  11. console.log('SUCCESS: `wisePerson` is working');
  12. } else {
  13. console.log('FAILURE: `wisePerson` is not working');
  14. }
  15. }
  16.  
  17. testWisePerson();
Add Comment
Please, Sign In to add comment