Svelte · Middle · Question 18 of 75
What does a function binding do (Svelte 5.9+)?
<input bind:value={
() => value,
(v) => value = v.toLowerCase()
} />- ✓Correct answer: It lets you control reading and writing a bound value with a getter and a setter, e.g. to transform input
- 2It binds to a function's return value only once
- 3It's a syntax error
Explanation
Before function bindings you'd need a separate oninput handler or an effect to transform values.