Beginner TypeScript
Q21 / 100

What does the "as" keyword do in TypeScript?

Correct! Well done.

Incorrect.

The correct answer is B) Performs type assertion, telling the compiler to treat a value as a specific type

B

Correct Answer

Performs type assertion, telling the compiler to treat a value as a specific type

Explanation

Type assertions like "value as string" tell the compiler to treat a value as a specified type without changing runtime behavior.

Progress
21/100