Complete the code to import the computed function from Vue.
import { [1] } from 'vue';
The computed function is imported from Vue to create computed properties in the Composition API.
Complete the code to define a computed property that returns the double of count.
const doubleCount = computed(() => [1] * 2);
In Composition API, to access the value inside a ref, you use .value. So count.value is correct.
Fix the error in the computed property by completing the blank.
const greeting = computed(() => `Hello, [1]!`);Since name is a ref, you must use name.value inside computed to get the actual string.
Fill both blanks to create a computed property that returns the full name by joining firstName and lastName.
const fullName = computed(() => [1].value + ' ' + [2].value);
The computed property accesses firstName.value and lastName.value to join them with a space.
Fill all three blanks to create a computed property that filters an array of numbers to only positive even numbers.
const evenNumbers = computed(() => [1].value.filter(num => num [2] 2 === 0 && num [3] 0));
The computed property accesses numbers.value and filters for numbers where num % 2 === 0 and num > 0.