-
Notifications
You must be signed in to change notification settings - Fork 1
03 Basics
SunilOS edited this page Aug 3, 2019
·
3 revisions
let name = "Ram"; console.log(name);
- let first:number = 123; // number
- let second: number = 0x37CF; // hexadecimal
- let third:number=0o377 ; // octal
- let fourth: number = 0b111001;// binary
- let uname:string = "Hello Ram"; //String
- let lname:string = "How are You?"; //String
- const VAR = 10;
- console.log("Value is: " +VAR);
- let arr:number[]; //
- arr = [1, 2, 3, 4];
- console.log(arr[0]);
- console.log(arr[1]);
- let arrTuple = [1, "Ram", 2, "Shyam"];
- console.log(arrTuple.length);
- console.log(arrTuple);
- console.log(arrTuple[0]);
- console.log(arrTuple[1]);
- console.log(arrTuple.pop()); // Remove an element
- arrTuple.push("Python"); // Add an element
- console.log(arrTuple.length);