Complete the code to create a signal with an initial value of 0.
const count = signal([1]);The signal function creates a reactive signal. Here, we start with 0 as the initial value.
Complete the code to update the signal value by adding 1.
count.set(count.[1]() + 1);
Use get() to read the current value of a signal before updating it.
Complete the code to create a signal with initial value 'user'.
const userModel = [1]('user');
The correct function to create a signal in Angular is signal. Other options are invalid.
Fill both blanks to create a signal and update it with a new value.
const name = [1](''); name.[2]('Alice');
Use signal to create the signal and set to update its value.
Fill all three blanks to create a signal, read its value, and update it conditionally.
const age = [1](20); const currentAge = age.[2](); if (currentAge < 30) { age.[3](currentAge + 1); }
Create the signal with signal, read its value with get(), and update it with set().
