This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Basic types | |
let name:string = "Sathya"; //string | |
let age:number = 35; //number | |
let isMale:boolean = true; //boolean | |
//tuple | |
let fullName:[string, string] = ["Sathyamoorthi", "Palanisamy"]; | |
//union type | |
let male:string | boolean = true; //value can be string or boolean |