Beginner TypeScript
Q15 / 100

How do you annotate a function parameter "name" as a string?

Correct! Well done.

Incorrect.

The correct answer is B) function greet(name: string)

B

Correct Answer

function greet(name: string)

Explanation

Parameter type annotations use a colon followed by the type, placed after the parameter name.

Progress
15/100