Skip to content

Instantly share code, notes, and snippets.

@samselikoff
Last active May 29, 2023 16:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samselikoff/7fa99992dbc5df5ecfd1ec721e64b86d to your computer and use it in GitHub Desktop.
Save samselikoff/7fa99992dbc5df5ecfd1ec721e64b86d to your computer and use it in GitHub Desktop.
VSCode snippet for creating a loop of n numbers in JSX! https://twitter.com/samselikoff/status/1611406980639244301
{
"Range of numbers": {
"scope": "javascriptreact,typescriptreact",
"prefix": "range",
"body": [
"{[...Array($1).keys()].map((i) => (",
" <$2 key={i}>",
" $3",
" </$2>",
"))}",
],
"description": "Create a loop of n numbers"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment