1. Type annotation
eg :-
let firstName : string = 45;
let firstName : number = 45;
let firstName : boolean = true;
let firstName : undefined
1. Type annotation
eg :-
let firstName : string = 45;
let firstName : number = 45;
let firstName : boolean = true;
let firstName : undefined
2. Type Any & unknown both used in function (***parameter***)=>{...}
:Any = store any type of data without any type checking by the TypeScript compiler
:unknown = best used when you don't know the type of data being typed. To add a type later
2. Type Any & unknown both used in function (***parameter***)=>{...}
:Any = store any type of data without any type checking by the TypeScript compiler
:unknown = best used when you don't know the type of data being typed. To add a type later