Skip to content

Instantly share code, notes, and snippets.

@LoganBarnett
Last active January 10, 2023 23:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LoganBarnett/23110f8dd00cd02e1015201035c2d8e2 to your computer and use it in GitHub Desktop.
Save LoganBarnett/23110f8dd00cd02e1015201035c2d8e2 to your computer and use it in GitHub Desktop.
const xs = []
const scope = {}
for(scope.i = 0; scope.i < 3; ++scope.i) {
xs.push(() => console.log('scope.i is', scope.i))
}
xs.forEach(f => f())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment