- Learning Ionic(Second Edition)
- Arvind Ravulavaru
- 50字
- 2021-07-02 23:24:24
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.
推薦閱讀
- 軟件安全技術(shù)
- 流量的秘密:Google Analytics網(wǎng)站分析與優(yōu)化技巧(第2版)
- Python自然語(yǔ)言處理實(shí)戰(zhàn):核心技術(shù)與算法
- 編程的修煉
- PHP 7底層設(shè)計(jì)與源碼實(shí)現(xiàn)
- Python爬蟲(chóng)開(kāi)發(fā):從入門(mén)到實(shí)戰(zhàn)(微課版)
- 編寫(xiě)整潔的Python代碼(第2版)
- SEO實(shí)戰(zhàn)密碼
- Reactive Programming With Java 9
- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- Mastering Ext JS
- Getting Started with Python and Raspberry Pi
- Maker基地嘉年華:玩轉(zhuǎn)樂(lè)動(dòng)魔盒學(xué)Scratch
- C陷阱與缺陷
- Android開(kāi)發(fā)進(jìn)階實(shí)戰(zhàn):拓展與提升