Beginner TypeScript
Q25 / 100

How do you define a constant variable in TypeScript that cannot be reassigned?

Correct! Well done.

Incorrect.

The correct answer is B) const x: number = 5;

B

Correct Answer

const x: number = 5;

Explanation

TypeScript uses JavaScript's "const" keyword to declare block-scoped constants that cannot be reassigned.

Progress
25/100