concept top - level variable in category svelte

appears as: Top-level variables, top-level variable
Svelte and Sapper in Action

This is an excerpt from Manning's book Svelte and Sapper in Action.

Top-level variables in the script element of a component define the state of the component. For example, the state of the component below includes the color and name variables.

Figure 3.3 Travel Packing login