types typescript

Estimated reading time: 1 minute

type

# Boolean
let isDanger: boolean = true;

# number
let isDanger: number = 121;

# string
let isDanger: string = "code4mk org";

# template string
let isDanger: string = "code4mk.org";
let isResult: string = `welcome to ${isDanger}`;

# Array
let isDanger: number[] = [1, 3, 5, 7];
let isDanger: Array<number> = [1, 3, 5, 7];

# any
let isDanger: any = "this is kamal"
node.js, js, typescript, ts