Skip to content

Instantly share code, notes, and snippets.

@kanian
Created May 21, 2019 13:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kanian/6438b20fb2a1e21424fdd1df9e9d9eec to your computer and use it in GitHub Desktop.
function* filler(from,to){
while(from <= to)
yield from++
}
function fill(x,y){
return [...filler(x,y)]
}
//fill(-1,10) /-> [-1,0,1,2,3,4,5,6,7,8,9,10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment