Skip to content

Instantly share code, notes, and snippets.

@ethnt
Created October 23, 2013 01:46
Show Gist options
  • Save ethnt/7111188 to your computer and use it in GitHub Desktop.
Save ethnt/7111188 to your computer and use it in GitHub Desktop.
function start(min_num, max_num) {
var min = min_num;
var max = max_num;
return result(min, max);
}
function guess(min_num, max_num) {
var guess = Math.floor((min + max) / 2);
return guess;
}
function low() {
return result(guess, max);
}
function high() {
return result(min, guess);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment