Complete the code to add a type annotation for the parameter name.
function greet(name: [1]) { return `Hello, ${name}!`; }
number or boolean instead of string.name should be a string because it represents a person's name.Complete the code to add a type annotation for the parameter age.
function setAge(age: [1]) {
console.log(`Age set to ${age}`);
}string instead of number.boolean or object incorrectly.age should be a number because it represents a numeric value.Fix the error by adding the correct type annotation for the parameter isActive.
function setActive(isActive: [1]) { if (isActive) { console.log('Active'); } else { console.log('Inactive'); } }
string or number instead of boolean.isActive should be a boolean because it represents a true/false value.Fill both blanks to add type annotations for parameters title and pages.
function createBook(title: [1], pages: [2]) { return `${title} has ${pages} pages.`; }
title and pages.boolean or object incorrectly.title is a string because it is text, and pages is a number because it counts pages.Fill all three blanks to add type annotations for parameters firstName, lastName, and age.
function personInfo(firstName: [1], lastName: [2], age: [3]) { return `${firstName} ${lastName} is ${age} years old.`; }
boolean for any parameter.firstName and lastName are string types because they are text, and age is a number.