Interpolation: {expression}
Embed JavaScript expressions directly into Svelte HTML templates.
Curly Brace Syntax
Embed any JavaScript expression in markup by wrapping it in curly braces.
<p>Hello {name}!</p>Math and Strings
Expressions can be more than variable names. Do math, string concatenation, or method calls.
<p>{count + 1} items, formatted: {name.toUpperCase()}</p>All lessons in this course
- The script template style Structure
- Reactive Variables with let
- Interpolation: {expression}
- Computed Values: $: reactive declarations