Skip to main content

Posts

Showing posts with the label typescript

Typescript Introduction

Data type Keyword Description Number number Double precision 64-bit floating point values. It can be used to represent both, integers and fractions. String string Represents a sequence of Unicode characters Boolean boolean Represents logical values, true and false Void void Used on function return types to represent non-returning functions Null null Represents an intentional absence of an object value. Undefined undefined Denotes value given to all uninitialized variables TypeScript provides data types as a part of its optional Type System. The data type classification is as given below − let a: number //e.g 1, 2, 3 let b: boolean //e.g true, false let c: string //e.g "abel agoi" let d: any //this can take any other types let e: number[] //array of numbers e.g [1, 3, 54] let f: any[] //any array e.g [1, "abel agoi", true] Arrow function : In javascript, we ca...