Skip to content

Instantly share code, notes, and snippets.

@kuyseng
Created June 20, 2012 04:22
Show Gist options
  • Save kuyseng/2958113 to your computer and use it in GitHub Desktop.
Save kuyseng/2958113 to your computer and use it in GitHub Desktop.
javascript: get array from range min max
function get_range (min, max) {
var arr = [];
for (var i = 0; i <= (max - min); i++) {
arr[i] = min + i;
};
return arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment