- Hands-On Full Stack Web Development with Angular 6 and Laravel 5
- Fernando Monteiro
- 79字
- 2021-07-23 19:18:50
Types: undefined and null
In TypeScript, undefined and null are types themselves; this means that undefined is a type (undefined) and null is a type (null). Confusing? undefined and null cannot be type variables; they can only be assigned as values to variables.
They are also different: a null variable means that a variable was set to null, while an undefined variable has no value assigned.
let A = null;
console.log(A) // null
console.log(B) // undefined
推薦閱讀
- C++黑客編程揭秘與防范
- 網(wǎng)絡(luò)創(chuàng)新指數(shù)研究
- 企業(yè)私有云建設(shè)指南
- 物聯(lián)網(wǎng)與無線傳感器網(wǎng)絡(luò)
- C/C++串口通信:典型應(yīng)用實(shí)例編程實(shí)踐
- 通信原理及MATLAB/Simulink仿真
- Windows Server 2012 Hyper-V虛擬化管理實(shí)踐
- 通信十年:擁抱互聯(lián)網(wǎng)
- 云計(jì)算技術(shù)與標(biāo)準(zhǔn)化
- 小型局域網(wǎng)組建
- SEO攻略:搜索引擎優(yōu)化策略與實(shí)戰(zhàn)案例詳解
- 物聯(lián)網(wǎng)技術(shù)與實(shí)踐
- 物聯(lián)網(wǎng)傳感器技術(shù)與應(yīng)用
- 網(wǎng)絡(luò)安全和信息化黨政領(lǐng)導(dǎo)干部一本通
- 網(wǎng)絡(luò)設(shè)備配置與調(diào)試項(xiàng)目實(shí)訓(xùn)