From 497b295f339a3322e6373375282bd5de921a93fe Mon Sep 17 00:00:00 2001 From: Siraj Samsudeen <11910293+siraj-samsudeen@users.noreply.github.com> Date: Sat, 28 Jan 2023 08:18:57 +0530 Subject: [PATCH] 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. --- .../tutorial/02-reactivity/02-reactive-declarations/text.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md b/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md index bfc58f1ebe..aa765d3493 100644 --- a/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md +++ b/site/content/tutorial/02-reactivity/02-reactive-declarations/text.md @@ -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; ```