Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 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 isDivisible(divisee, divisor) {
  12. return divisee % divisor === 0;
  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.  
  26. // tests
  27.  
  28. function testIsDivisible() {
  29. if (isDivisible(10, 2) && !isDivisible(11, 2)) {
  30. console.log('SUCCESS: `isDivisible` is working');
  31. }
  32. else {
  33. console.log('FAILURE: `isDivisible` is not working');
  34. }
  35. }
  36.  
  37. testIsDivisible();
  38. </script>
  39.  
  40.  
  41.  
  42. <script id="jsbin-source-javascript" type="text/javascript">function isDivisible(divisee, divisor) {
  43. return divisee % divisor === 0;
  44. }
  45.  
  46.  
  47. /* From here down, you are not expected to
  48. understand.... for now :)
  49.  
  50.  
  51. Nothing to see here!
  52.  
  53. */
  54.  
  55.  
  56.  
  57. // tests
  58.  
  59. function testIsDivisible() {
  60. if (isDivisible(10, 2) && !isDivisible(11, 2)) {
  61. console.log('SUCCESS: `isDivisible` is working');
  62. }
  63. else {
  64. console.log('FAILURE: `isDivisible` is not working');
  65. }
  66. }
  67.  
  68. testIsDivisible();</script></body>
  69. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement