Like Array, but Tuple can store a collection of values of varied types: Syntax Example: Accessing values in Tuples Syntax Example: Result: Destructuring a Tuple…
Features of an Array An array declaration allocates sequential memory blocks. Arrays are static. This means that an array once initialized cannot be resized. Each…
Example about String: The String object Syntax String Properties constructor : Returns a reference to the String function that created the object. Example: Result: length…
The Number class Syntax Number Properties: S.No. Property & Description 1. MAX_VALUE The largest possible value a number in TypeScript can have 1.7976931348623157E+308. 2. MIN_VALUE…
TypeScript – Functions Defining a Function Syntax: Example 1: Example 2: anonymous function Calling a Function A function must be called so as to execute…
TypeScript – Decision Making Decision-making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with…
TypeScript – Operators Arithmetic Operators Operator Description Example + (Addition) returns the sum of the operands var z = x + y – (Subtraction) returns…