JS

TypeScript Quiz - typescript problem

14.

Will TypeScript detect a problem with the following code? If so, what's the problem?

let x: number = "hello";

The code has a syntax error.

TypeScript will not detect a problem with this code.

No, there is no problem with the code.

Yes: Type 'string' is not assignable to type 'number'