Which fix removes the bug?
let count: number; console.log(count + 1);
- Initialise count first
- Type count as any
- Use a const instead
- Add a null check
The variable is declared but never assigned, so it is used before being definitely assigned.
Play Problem Solving ▸