Complete the code to import the function needed to create a derived store in Svelte.
import { [1] } from 'svelte/store';
The derived function is used to create a store that depends on other stores.
Complete the code to create a derived store that doubles the value of a writable store named 'count'.
const doubled = derived(count, $count => $count [1] 2);
The derived store multiplies the value by 2, so the operator is *.
Fix the error in the derived store callback to correctly access the value of the store.
const doubled = derived(count, [1] => [1] * 2);
Inside the derived callback, the store value is accessed with a $ prefix, like $count.
Fill both blanks to create a derived store that sums two writable stores 'a' and 'b'.
const sum = derived([[1], [2]], ([$a, $b]) => $a + $b);
The derived store depends on stores 'a' and 'b' to sum their values.
Fill all three blanks to create a derived store that formats a user's full name from 'firstName' and 'lastName' stores.
const fullName = derived([[1], [2]], ([$firstName, $lastName]) => `$[3] $lastName`);
The derived store uses template literals to combine the first and last names. The blanks fill the dependencies and the template expression.