113 Study Guide - Quiz Guide: Typescript, Array Data Structure, Foreach Loop

7 views11 pages

Document Summary

Step: typescript part 2 what is, types, interfaces, Will accept logical values like true, false, 0, and 1. Syntax: let bflag :boolean = 1; let status :boolean = true. Syntax: let a :any = 123 a = "hello world"; // changing type will not give any error. Variables declared using any type can take the variable as a string, number, array, boolean or void. Typescript will not throw any compile-time error; this is similar to the variables declared in javascript. Make use of any type variable only when you are not certain about the type of value which will be associated with that variable. A type that is commonly used as a return type on a function which does not have anything to return. A data type wherein you can store multiple values learn how to declare and assign values for array operations in. Sample: let months: array = ["jan", "feb", "march", "april", "may", "june",