TS Quiz
📚
Learn
🇬🇧
English
▾
Progress
1/25
Question 1 of 25
What will happen when this code runs?
typescript
let
x
:
number
=
5
;
let
y
:
string
=
x;
A
Code will compile successfully
B
Compile error — type 'number' is not assignable to type 'string'
C
y will equal '5'
D
Runtime error
A/B/C/D or 1/2/3/4 — answers · ←/→ — navigation