Skip to content

Instantly share code, notes, and snippets.

@nire0510
Created February 29, 2016 11:23
Show Gist options
  • Save nire0510/0dba3ccb7bb7c5e05a8f to your computer and use it in GitHub Desktop.
Save nire0510/0dba3ccb7bb7c5e05a8f to your computer and use it in GitHub Desktop.
Ember helper: generates range of numbers
import Ember from 'ember';
export function range(params/*, hash*/) {
var arrRange = [];
for (var i = params[0]; i <= params[1]; i++) {
arrRange.push(i);
}
return arrRange;
}
export default Ember.Helper.helper(range);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment