Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript variable types

let name: string; // stores text
let age: number; // stores numbers
let isMale: boolean; // stores a true or false values
let typeAny: any; // stores any type of value
let typeNull: null = null; // can only store a null value
let typeUndefined: undefined = undefined; // can only store undefined value

// these are the basic types of variables in TypeScript
// and of course you can change let to const
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #typescript #variable #types
ADD COMMENT
Topic
Name
4+9 =