Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. function isDivisible(divisee, divisor) {
  2. if(divisee % divisor === 0){
  3. return true
  4. }else{
  5. return false
  6. }
  7. }
  8.  
  9. /* From here down, you are not expected to
  10. understand.... for now :)
  11.  
  12.  
  13. Nothing to see here!
  14.  
  15. */
  16.  
  17. // tests
  18.  
  19. function testIsDivisible() {
  20. if (isDivisible(10, 2) && !isDivisible(11, 2)) {
  21. console.log('SUCCESS: `isDivisible` is working');
  22. } else {
  23. console.log('FAILURE: `isDivisible` is not working');
  24. }
  25. }
  26.  
  27. testIsDivisible();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement