Beginner
TypeScript
Q27 / 100
Which of the following correctly defines a function type?
Correct! Well done.
Incorrect.
The correct answer is A) let add: (a: number, b: number) => number;
A
Correct Answer
let add: (a: number, b: number) => number;
Explanation
Function types are written as parameter list followed by "=>" and the return type, e.g. (a: number, b: number) => number.
Progress
27/100