SHARE
TWEET

Untitled

a guest Aug 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function shouter(whatToShout) {
  2.   let newStr = whatToShout.toUpperCase() + "!!!"
  3.   return newStr;
  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 testShouter() {
  17.   const whatToShout = 'fee figh foe fum';
  18.   const expected = 'FEE FIGH FOE FUM!!!';
  19.   if (shouter(whatToShout) === expected) {
  20.     console.log('SUCCESS: `shouter` is working');
  21.   } else {
  22.     console.log('FAILURE: `shouter` is not working');
  23.   }
  24. }
  25.  
  26. testShouter();
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