Guest User

Untitled

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