Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function shouter(whatToShout) {
  2. const shout = whatToShout + "!!!";
  3. const shouts = shout.toUpperCase();
  4. return shouts;
  5. }
  6.  
  7. /* From here down, you are not expected to
  8. understand.... for now :)
  9.  
  10.  
  11. Nothing to see here!
  12.  
  13. */
  14.  
  15. // tests
  16.  
  17. function testShouter() {
  18. const whatToShout = 'fee figh foe fum';
  19. const expected = 'FEE FIGH FOE FUM!!!';
  20. if (shouter(whatToShout) === expected) {
  21. console.log('SUCCESS: `shouter` is working');
  22. } else {
  23. console.log('FAILURE: `shouter` is not working');
  24. }
  25. }
  26.  
  27. testShouter();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement