Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function shouter(whatToShout) {
  2. return whatToShout.toUpperCase()+ '!!!';
  3. }
  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.  
  15. // tests
  16.  
  17. function testShouter() {
  18. var whatToShout = 'fee figh foe fum';
  19. var expected = 'FEE FIGH FOE FUM!!!';
  20. if (shouter(whatToShout) === expected) {
  21. console.log('SUCCESS: `shouter` is working');
  22. }
  23. else {
  24. console.log('FAILURE: `shouter` is not working');
  25. }
  26. }
  27.  
  28. testShouter();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement