-
-
Save odino/6d6b5d1f6032c12f7817eff8fd7a4db8 to your computer and use it in GitHub Desktop.
This file contains 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
function divide(int) { | |
int = Math.round(int / 2) | |
if (int > 10) { | |
return divide(int) | |
} | |
return int | |
} | |
function hash(key) { | |
let h = require('string-hash')(key) | |
return divide(h) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment