Skip to content

Instantly share code, notes, and snippets.

@liseferguson
Created March 10, 2018 01:50
Show Gist options
  • Save liseferguson/0c9ea887b96e91b9af39e93db0a5533a to your computer and use it in GitHub Desktop.
Save liseferguson/0c9ea887b96e91b9af39e93db0a5533a to your computer and use it in GitHub Desktop.
function isDivisible(divisee, divisor) {
return divisee % divisor === 0;
}
/* From here down, you are not expected to
understand.... for now :)
Nothing to see here!
*/
// tests
function testIsDivisible() {
if (isDivisible(10, 2) && !isDivisible(11, 2)) {
console.log('SUCCESS: `isDivisible` is working');
} else {
console.log('FAILURE: `isDivisible` is not working');
}
}
testIsDivisible();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment