What happens if you try to assign a string to a variable inferred as a number?
let x = 100;
x = "Hello";
The code compiles and runs without errors
TypeScript throws a compilation error
TypeScript changes the type of x to string
The value is automatically converted to a number
This question is part of this quiz :
Type Annotation and Inference in TypeScript