Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  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();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement