Javascript version.

Can be run from the console of a browser, but can also get a UI if needed. Copy the code into the console, and run NumGuess.help() :)