Skip to content

Instantly share code, notes, and snippets.

@ryochin
Created December 22, 2023 01:44
Show Gist options
  • Save ryochin/5165d58abe28dd264f37f6d335e94b8a to your computer and use it in GitHub Desktop.
Save ryochin/5165d58abe28dd264f37f6d335e94b8a to your computer and use it in GitHub Desktop.
TypeScript: range()
const range = (begin: number, end: number) => ([...Array(end - begin)].map((_, i) => (begin + i)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment