should we not declare doubled before using it?

I am a bit confused as to how doubled is recognized as a variable even though there is no declaration. Is a global variable created automatically using var? 

P.S. I am new to Svelte - I am not sure how to raise this issue. I looked through the open source contributing guide and felt that editing the tutorial is the right way to point out the issue. If I should create an issue, please let me know.
pull/8229/head
Siraj Samsudeen 4 years ago committed by GitHub
parent eb90a15c29
commit 497b295f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@ Svelte's reactivity not only keeps the DOM in sync with your application's varia
```js
let count = 0;
let doubled ;
$: doubled = count * 2;
```

Loading…
Cancel
Save