4 Matching Annotations
- Dec 2020
-
svelte.dev svelte.dev
-
Don't worry about the fact that we're redeclaring the foo function for every component instance — Svelte will hoist any functions that don't depend on local state out of the component definition.
Tags
Annotators
URL
-
-
github.com github.com
- Sep 2020
-
en.wikipedia.org en.wikipedia.org
-
can be used to avoid variable hoisting from within blocks
-
-
developer.mozilla.org developer.mozilla.orgvar1
-
For that reason, it is recommended to always declare variables at the top of their scope (the top of global code and the top of function code) so it's clear which variables are function scoped (local) and which are resolved on the scope chain.
-