Read the question, write TypeScript on the right, then Run or Check.
QuestionHint and solution stay closed until you open them
Score → A/B/C/D/F bands.
Examples
Input
95
Output
A
Input
72
Output
C
Hint
- if / else if chain
Show correct code
Peek only after you have tried. You can still Check your own version.
const s: number = Number(readLine());
let g = 'F';
if (s >= 90) g = 'A';
else if (s >= 80) g = 'B';
else if (s >= 70) g = 'C';
else if (s >= 60) g = 'D';
console.log(g);
main.tstsc · readLine() · Ctrl + Enter
ResultIdle
Run to see output. Check grades the tests.