Beginner
Annotate a Parameter
Strict mode reports the parameter word because it has no type. Add a type annotation so shout only accepts text.
The checks also try shout(5) and expect TypeScript to reject it.
What Check tests
- Your code has no type errors
shout(5)is rejected by TypeScript- The console prints
HELLO!
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.