Created
November 1, 2011 16:52
-
-
Save craigmdennis/1331149 to your computer and use it in GitHub Desktop.
Return true if one number is a multiple of the other
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Return true if it is a multiple | |
| function multiple(int, multipleOf) { | |
| var remainder = int % multipleOf; | |
| if (remainder === 0) { | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment