Guest User

Untitled

a guest
Jul 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>JS Bin</title>
  7. </head>
  8. <body>
  9.  
  10. <script id="jsbin-javascript">
  11. function shouter(whatToShout) {
  12. return whatToShout.toUpperCase() + '!!!';}
  13.  
  14.  
  15. /* From here down, you are not expected to
  16. understand.... for now :)
  17.  
  18.  
  19. Nothing to see here!
  20.  
  21. */
  22.  
  23.  
  24. // tests
  25.  
  26. function testShouter() {
  27. var whatToShout = 'fee figh foe fum';
  28. var expected = 'FEE FIGH FOE FUM!!!';
  29. if (shouter(whatToShout) === expected) {
  30. console.log('SUCCESS: `shouter` is working');
  31. }
  32. else {
  33. console.log('FAILURE: `shouter` is not working');
  34. }
  35. }
  36.  
  37. testShouter();
  38. </script>
  39.  
  40.  
  41.  
  42. <script id="jsbin-source-javascript" type="text/javascript">function shouter(whatToShout) {
  43. return whatToShout.toUpperCase() + '!!!';}
  44.  
  45.  
  46. /* From here down, you are not expected to
  47. understand.... for now :)
  48.  
  49.  
  50. Nothing to see here!
  51.  
  52. */
  53.  
  54.  
  55. // tests
  56.  
  57. function testShouter() {
  58. var whatToShout = 'fee figh foe fum';
  59. var expected = 'FEE FIGH FOE FUM!!!';
  60. if (shouter(whatToShout) === expected) {
  61. console.log('SUCCESS: `shouter` is working');
  62. }
  63. else {
  64. console.log('FAILURE: `shouter` is not working');
  65. }
  66. }
  67.  
  68. testShouter();</script></body>
  69. </html>
Add Comment
Please, Sign In to add comment