Beginner
Replace an Enum
Status is an enum, so label("ACTIVE") is rejected and the enum emits extra code. Replace it with an as const object named Status plus a type also named Status that is the union of its values.
The function label and the log lines should keep working. The checks use plain strings like "ACTIVE" and the word enum must be gone from your code.
What Check tests
- Your code has no type errors
- The plain string "ACTIVE" is accepted
- An unknown value is rejected
- No enum is left
- The console prints
Welcome Blocked
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Press Run to see the page.
Console
Nothing printed yet.