- Object-Oriented JavaScript(Second Edition)
- Stoyan Stefanov Kumar Chetan Sharma
- 133字
- 2021-08-13 16:19:29
Primitive data types recap
Let's quickly summarize some of the main points discussed so far:
- There are five primitive data types in JavaScript:
- Number
- String
- Boolean
- Undefined
- Null
- Everything that is not a primitive data type is an object
- The primitive number data type can store positive and negative integers or floats, hexadecimal numbers, octal numbers, exponents, and the special numbers
NaN
,Infinity
, and–Infinity
- The string data type contains characters in quotes
- The only values of the Boolean data type are
true
andfalse
- The only value of the null data type is the value
null
- The only value of the undefined data type is the value
undefined
- All values become
true
when converted to a Boolean, with the exception of the six falsy values:""
null
undefined
0
NaN
false
推薦閱讀
- Objective-C Memory Management Essentials
- Mastering Selenium WebDriver
- Scratch 3游戲與人工智能編程完全自學教程
- 信息技術應用基礎
- Learning SciPy for Numerical and Scientific Computing(Second Edition)
- RESTful Java Web Services(Second Edition)
- Mastering React
- Java網(wǎng)絡編程實戰(zhàn)
- TMS320LF240x芯片原理、設計及應用
- 視窗軟件設計和開發(fā)自動化:可視化D++語言
- 超好玩的Scratch 3.5少兒編程
- Web前端開發(fā)技術:HTML、CSS、JavaScript
- 官方 Scratch 3.0 編程趣味卡:讓孩子們愛上編程(全彩)
- Learning Alfresco Web Scripts
- Scratch少兒編程思維訓練:培養(yǎng)孩子的邏輯思維和計算思維能力