You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/tutorial/02-reactivity/03-reactive-statements/text.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,23 +5,23 @@ title: Statements
5
5
We're not limited to declaring reactive *values* — we can also run arbitrary *statements* reactively. For example, we can log the value of `count` whenever it changes:
6
6
7
7
```js
8
-
$:console.log(`the count is ${count}`);
8
+
$:console.log('the count is '+count);
9
9
```
10
10
11
11
You can easily group statements together with a block:
12
12
13
13
```js
14
14
$: {
15
-
console.log(`the count is ${count}`);
16
-
alert(`I SAID THE COUNT IS ${count}`);
15
+
console.log('the count is '+count);
16
+
alert('I SAID THE COUNT IS '+count);
17
17
}
18
18
```
19
19
20
20
You can even put the `$:` in front of things like `if` blocks:
0 commit comments