mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
161 B
20 lines
161 B
5 years ago
|
<script>
|
||
|
let x = 0;
|
||
|
let y = 1;
|
||
|
|
||
|
x += 1;
|
||
|
|
||
|
{
|
||
|
x += 2;
|
||
|
}
|
||
|
|
||
|
setTimeout(function foo() {
|
||
|
x += 10;
|
||
|
y += 20;
|
||
|
}, 1000);
|
||
|
|
||
|
$: x += y;
|
||
|
</script>
|
||
|
|
||
|
<p>x: {x}</p>
|