Skip to content

Instantly share code, notes, and snippets.

@ruyahs
Last active November 26, 2021 19:13
Show Gist options
  • Save ruyahs/9ea32cfad66c7af6b35d11b6e6355ce3 to your computer and use it in GitHub Desktop.
Save ruyahs/9ea32cfad66c7af6b35d11b6e6355ce3 to your computer and use it in GitHub Desktop.
Generates a range of values with an IIFE
var RangeOfValues = ((low , high) => {
var ArrOfRangeOFValues = [] ;
for (let index = low; index < high; index++) {
ArrOfRangeOFValues.push(index)
}
return ArrOfRangeOFValues ;
})(0,100) ;
console.log(RangeOfValues);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment