Skip to content

Instantly share code, notes, and snippets.

@jonathanconway
Created December 9, 2010 02:15
Show Gist options
  • Save jonathanconway/734237 to your computer and use it in GitHub Desktop.
Save jonathanconway/734237 to your computer and use it in GitHub Desktop.
between() method for number types
Number.prototype.between = function(n1, n2) { return this >= n1 && this <= n2; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment