daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Mar 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wisePerson(wiseType, whatToSay) {
  2.   return `A wise ${wiseType} once said: "${whatToSay}".`;
  3.  
  4. }
  5.  
  6.  
  7.  
  8. /* From here down, you are not expected to
  9.    understand.... for now :)  
  10.    
  11.    
  12.    Nothing to see here!
  13.    
  14. */
  15.  
  16. // tests
  17.  
  18. function testWisePerson() {
  19.   const wiseType = 'goat';
  20.   const whatToSay = 'hello world';
  21.   const expected = 'A wise ' + wiseType + ' once said: "' + whatToSay + '".';
  22.   const actual = wisePerson(wiseType, whatToSay);
  23.   if (expected === actual) {
  24.     console.log('SUCCESS: `wisePerson` is working');
  25.   } else {
  26.     console.log('FAILURE: `wisePerson` is not working');
  27.   }
  28. }
  29.  
  30. testWisePerson();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top