concept variable in category svelte
appears as: variable, variables, variable, The variables

This is an excerpt from Manning's book Svelte and Sapper in Action.
This works, but it’s a bit verbose. We can do better using the Svelte
binddirective. You will see many uses of thebinddirective later, but one use is to bind the value of a form element to a variable. This causes the form element to display the current value of the variable. If a user changes the value of the form element, the variable will be updated to match.
myArr = myArr.concat(newValue); myArr = [...myArr, newValue]; myArr.push(newValue); myArr = myArr;
<script context="module"> ... </script>