- 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
推薦閱讀
- 社交網絡對齊
- 物聯網識別技術
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 物聯網安全技術
- Mastering TypeScript 3
- Metasploit Penetration Testing Cookbook
- 城市治理一網統管
- The Kubernetes Workshop
- 基于性能的保障理論與方法
- bash網絡安全運維
- Hands-On Docker for Microservices with Python
- 人際網絡
- Building Microservices with Spring
- 企業網絡組建與維護項目式教程
- Telerik WPF Controls Tutorial