Advertisement
Guest User

5. Division by 3

a guest
Jul 23rd, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function divisionBy3(value) {
  2.     var result = 'the number is divided by 3 without remainder';
  3.     if (value % 3 !== 0) {
  4.         result = 'the number is not divided by 3 without remainder';
  5.     }
  6.     return result;
  7. }
  8.  
  9. console.log(divisionBy3(12));
  10. console.log(divisionBy3(190));
  11. console.log(divisionBy3(591));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement