Basic data types in typescript

There are three commonly used primitives data types in Typescript: boolean, string, and number

string can hold like "Hello, Kishar".

let name : string ="Hello, kishar"

If you try to assign number, it will throw an error.

The next commonly used data type is boolean.

let flag : boolean = true;

If you assign string to flag , it will throw an error

The next common data type is number

let age : number = 44;

You can not assign any other value in this age variable.