官术网_书友最值得收藏!

Defining types

When we declare variables, we can optionally declare the types of variables. For instance:

name: string = 'Arvind'; 
age: number = 99;
isAlive: boolean = true;
hobbies: string[];
anyType: any;
noType = 50;
noType = 'Random String';

This increases the predictability of what we are trying to do.

主站蜘蛛池模板: 定陶县| 兰考县| 凤台县| 同心县| 子长县| 凯里市| 靖西县| 普宁市| 含山县| 施甸县| 清镇市| 凯里市| 澳门| 罗平县| 资中县| 红原县| 开远市| 阆中市| 洛浦县| 蕉岭县| 开原市| 小金县| 汉沽区| 新津县| 钟祥市| 衡东县| 夏河县| 托克托县| 大埔区| 十堰市| 紫阳县| 光泽县| 旅游| 祁东县| 车险| 阳信县| 射洪县| 鹿泉市| 阜康市| 松阳县| 昌图县|