Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isDivisible(divisee, divisor) {
- return divisee % divisor === 0;
- }
- function testIsDivisible() {
- if (isDivisible(10, 2) && !isDivisible(11, 2)) {
- console.log('SUCCESS: `isDivisible` is working');
- }
- else {
- console.log('FAILURE: `isDivisible` is not working');
- }
- }
- testIsDivisible();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement