Оставьте свои контакты и наш менеджер свяжется с вами в ближайшее время
// Explicit typing let username: string = "Alice"; let age: number = 30; let isActive: boolean = true; // Type inference (hover to see TS inferred type) let city = "Paris"; // string let score = 99.5; // number
// Typed parameters and return value function greet(name: string, greeting?: string): string return `$greeting ?? "Hello", $name`;
console.log(fruits, numbers, person, taskStatus); src/features/3-functions.ts
// Generic function function identity<T>(value: T): T return value;
// Generic constraint function getLength<T extends length: number >(item: T): number return item.length;
// Literal types let direction: "north" | "south" | "east" | "west"; direction = "north"; // OK // direction = "up"; // Error
Данный сайт предназначен исключительно для лиц, достигших 18 лет. Сайт содержит информацию о табачной продукции и имеет целью предоставление информации о потребительских свойствах и качественных характеристиках товара. Нажимая кнопку "Войти", Вы подтверждаете, что вам исполнилось полных 18 лет и вы согласны получить информацию, касающуюся табачной продукции.
// Explicit typing let username: string = "Alice"; let age: number = 30; let isActive: boolean = true; // Type inference (hover to see TS inferred type) let city = "Paris"; // string let score = 99.5; // number
// Typed parameters and return value function greet(name: string, greeting?: string): string return `$greeting ?? "Hello", $name`;
console.log(fruits, numbers, person, taskStatus); src/features/3-functions.ts
// Generic function function identity<T>(value: T): T return value;
// Generic constraint function getLength<T extends length: number >(item: T): number return item.length;
// Literal types let direction: "north" | "south" | "east" | "west"; direction = "north"; // OK // direction = "up"; // Error
Оставьте свои контакты и наш менеджер свяжется с вами в ближайшее время