Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. function wisePerson(wiseType, whatToSay) {
  2. // your code here
  3. return `A wise ${wiseType} once said: "${whatToSay}".`
  4. }
  5.  
  6. /* From here down, you are not expected to
  7. understand.... for now :)
  8.  
  9.  
  10. Nothing to see here!
  11.  
  12. */
  13.  
  14. // tests
  15.  
  16. function testWisePerson() {
  17. const wiseType = 'goat';
  18. const whatToSay = 'hello world';
  19. const expected = 'A wise ' + wiseType + ' once said: "' + whatToSay + '".';
  20. const actual = wisePerson(wiseType, whatToSay);
  21. if (expected === actual) {
  22. console.log('SUCCESS: `wisePerson` is working');
  23. } else {
  24. console.log('FAILURE: `wisePerson` is not working');
  25. }
  26. }
  27.  
  28. testWisePerson();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement