Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- function isDivisible(divisee, divisor) {
- return divisee % divisor === 0;
- }
- /* From here down, you are not expected to
- understand.... for now :)
- Nothing to see here!
- */
- // tests
- function testIsDivisible() {
- if (isDivisible(10, 2) && !isDivisible(11, 2)) {
- console.log('SUCCESS: `isDivisible` is working');
- }
- else {
- console.log('FAILURE: `isDivisible` is not working');
- }
- }
- testIsDivisible();
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">function isDivisible(divisee, divisor) {
- return divisee % divisor === 0;
- }
- /* From here down, you are not expected to
- understand.... for now :)
- Nothing to see here!
- */
- // tests
- function testIsDivisible() {
- if (isDivisible(10, 2) && !isDivisible(11, 2)) {
- console.log('SUCCESS: `isDivisible` is working');
- }
- else {
- console.log('FAILURE: `isDivisible` is not working');
- }
- }
- testIsDivisible();</script></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement