Created
February 29, 2016 11:23
-
-
Save nire0510/0dba3ccb7bb7c5e05a8f to your computer and use it in GitHub Desktop.
Ember helper: generates range of numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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