Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 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 wisePerson(wiseType, whatToSay) {
  12. return 'A wise ' +
  13. wiseType + ' once said: "' + whatToSay + '".';
  14. }
  15.  
  16. function testWisePerson() {
  17. var wiseType = 'goat';
  18. var whatToSay = 'hello world';
  19. var expected = 'A wise ' + wiseType + ' once said: "' +
  20. whatToSay + '".';
  21. var actual = wisePerson(wiseType, whatToSay);
  22. if (expected === actual) {
  23. console.log('SUCCESS: `wisePerson` is working');
  24. }
  25. else {
  26. console.log('FAILURE: `wisePerson` is not working');
  27. }
  28. }
  29.  
  30. testWisePerson();
  31. </script>
  32.  
  33.  
  34.  
  35. <script id="jsbin-source-javascript" type="text/javascript">function wisePerson(wiseType, whatToSay) {
  36. return 'A wise ' +
  37. wiseType + ' once said: "' + whatToSay + '".';
  38. }
  39.  
  40. function testWisePerson() {
  41. var wiseType = 'goat';
  42. var whatToSay = 'hello world';
  43. var expected = 'A wise ' + wiseType + ' once said: "' +
  44. whatToSay + '".';
  45. var actual = wisePerson(wiseType, whatToSay);
  46. if (expected === actual) {
  47. console.log('SUCCESS: `wisePerson` is working');
  48. }
  49. else {
  50. console.log('FAILURE: `wisePerson` is not working');
  51. }
  52. }
  53.  
  54. testWisePerson();</script></body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement