TypeScript | Type Annotation and Inference in TypeScript | Question7

Last Updated :
Discuss
Comments

What will be the inferred type of the variable flag in the following code?

TypeScript
let flag = true;


boolean

any

true

unknown

Share your thoughts in the comments