- 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
推薦閱讀
- Spring 5.0 Microservices(Second Edition)
- LabVIEW2018中文版 虛擬儀器程序設計自學手冊
- CentOS 7 Linux Server Cookbook(Second Edition)
- iOS開發實戰:從零基礎到App Store上架
- 實用防銹油配方與制備200例
- Python自然語言處理(微課版)
- 精通網絡視頻核心開發技術
- Learning Python by Building Games
- R Data Analysis Cookbook(Second Edition)
- .NET 3.5編程
- C和C++游戲趣味編程
- 區塊鏈技術進階與實戰(第2版)
- Kotlin開發教程(全2冊)
- Learning JavaScript Data Structures and Algorithms(Second Edition)
- 深度學習入門:基于Python的理論與實現