Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function isDivisible(divisee, divisor) {
  2. return divisee % divisor === 0;
  3.  
  4. }
  5.  
  6.  
  7. function testIsDivisible() {
  8. if (isDivisible(10, 2) && !isDivisible(11, 2)) {
  9. console.log('SUCCESS: `isDivisible` is working');
  10. }
  11. else {
  12. console.log('FAILURE: `isDivisible` is not working');
  13. }
  14. }
  15.  
  16. testIsDivisible();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement