Guest User

Untitled

a guest
Sep 23rd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 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.  
  16. /* From here down, you are not expected to
  17. understand.... for now :)
  18.  
  19.  
  20. Nothing to see here!
  21.  
  22. */
  23.  
  24.  
  25. // tests
  26.  
  27. function testShouter() {
  28. var whatToShout = 'as you can hear i am whispering';
  29. var expected = 'AS YOU CAN HEAR I AM WHISPERING!!!';
  30. if (shouter(whatToShout) === expected) {
  31. console.log('SUCCESS: `shouter` is working');
  32. }
  33. else {
  34. console.log('FAILURE: `shouter` is not working');
  35. }
  36. }
  37.  
  38. testShouter();
  39. </script>
  40.  
  41.  
  42.  
  43. <script id="jsbin-source-javascript" type="text/javascript">function shouter(whatToShout) {
  44. return whatToShout.toUpperCase + "'!!!'";
  45. }
  46.  
  47.  
  48. /* From here down, you are not expected to
  49. understand.... for now :)
  50.  
  51.  
  52. Nothing to see here!
  53.  
  54. */
  55.  
  56.  
  57. // tests
  58.  
  59. function testShouter() {
  60. var whatToShout = 'as you can hear i am whispering';
  61. var expected = 'AS YOU CAN HEAR I AM WHISPERING!!!';
  62. if (shouter(whatToShout) === expected) {
  63. console.log('SUCCESS: `shouter` is working');
  64. }
  65. else {
  66. console.log('FAILURE: `shouter` is not working');
  67. }
  68. }
  69.  
  70. testShouter();</script></body>
  71. </html>
Add Comment
Please, Sign In to add comment