Intermediate TypeScript
Q73 / 100

How does TypeScript treat enums with string values, e.g. "enum Color { Red = 'RED', Blue = 'BLUE' }"?

Correct! Well done.

Incorrect.

The correct answer is A) String enums do not auto-increment and each member must be initialized explicitly

A

Correct Answer

String enums do not auto-increment and each member must be initialized explicitly

Explanation

Unlike numeric enums, string enum members must each have a literal string value explicitly assigned; there is no auto-incrementing.

Progress
73/100