Liczba liczby całkowitej
// There is no int type, use number
const myInt: number = 17;
const myDecimal: number = 17.5;
Arrogant Ape
// There is no int type, use number
const myInt: number = 17;
const myDecimal: number = 17.5;
let list: number[] = [1, 2, 3];
let emplName:string = "Mohit Jain";
let compName:string = "geeksforgeeks";
// Pre-ES6
let emplDetail1: string = emplName + " works in the " + compName + " company.";
// Post-ES6
let emplDetail2: string = `${emplName} works in the ${compName} company.`;
console.log("Before ES6: " +emplDetail1);
console.log("After ES6: " +emplDetail2);
let emplName:string = "Mohit Jain";
let compName:string = "geeksforgeeks";
// Pre-ES6
let emplDetail1: string = emplName + " works in the " + compName + " company.";
// Post-ES6
let emplDetail2: string = `${emplName} works in the ${compName} company.`;
console.log("Before ES6: " +emplDetail1);
console.log("After ES6: " +emplDetail2);