SHARE
TWEET

Untitled

a guest Apr 18th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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();
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