Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import Svelte's main function.
Svelte
import [1] from 'svelte';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing runtime functions like onMount instead of compile.
✗ Incorrect
Svelte works by compiling components ahead of time, so compile is the key function.
2fill in blank
mediumComplete the code to explain Svelte's main advantage.
Svelte
Svelte exists because it [1] code at build time, not runtime.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing compile with run or render.
✗ Incorrect
Svelte compiles your code before the app runs, making it faster and smaller.
3fill in blank
hardFix the error in the sentence about Svelte's approach.
Svelte
Unlike other frameworks, Svelte does not use a virtual DOM but instead [1] code to update the DOM directly.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing generates or ignores which are less precise.
✗ Incorrect
Svelte compiles code that updates the DOM directly, avoiding virtual DOM overhead.
4fill in blank
hardFill both blanks to complete the explanation of Svelte's benefit.
Svelte
Svelte [1] less code in the browser and [2] faster updates.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up runs and compiles or makes and delivers.
✗ Incorrect
Svelte compiles less code to run in the browser and delivers faster updates to the user.
5fill in blank
hardFill all three blanks to describe Svelte's unique feature.
Svelte
Svelte [1] components at build time, [2] the need for a virtual DOM, and [3] smaller, faster apps.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using creates instead of compiles or creates instead of enables.
✗ Incorrect
Svelte compiles components at build time, removes the virtual DOM, and enables smaller, faster apps.