Learn TypeScript
Quiz
Quiz
This quiz will test what you have learned about using types.
1.
Is there a Date
type in JavaScript?
2.
Is there a Date
type in TypeScript?
3.
Is the type annotation necessary to type the amount
variable to number
in the declaration below?
let amount: number = 1000;
4.
Is the type annotation necessary to type the message
parameter to string
in the declaration below?
function logMessage(message: string) { ...}
5.
What is the type of the message
parameter in the following function?
function outputMessage(message) { console.log(message);}