- 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
推薦閱讀
- Python編程自學手冊
- Mastering AWS Lambda
- Android開發(fā)精要
- Dependency Injection in .NET Core 2.0
- 神經(jīng)網(wǎng)絡編程實戰(zhàn):Java語言實現(xiàn)(原書第2版)
- 數(shù)據(jù)結(jié)構(gòu)習題精解(C語言實現(xiàn)+微課視頻)
- Mastering ServiceNow(Second Edition)
- jQuery Mobile移動應用開發(fā)實戰(zhàn)(第3版)
- Mastering AWS Security
- 實戰(zhàn)Java高并發(fā)程序設計(第2版)
- 區(qū)塊鏈架構(gòu)之美:從比特幣、以太坊、超級賬本看區(qū)塊鏈架構(gòu)設計
- Python Digital Forensics Cookbook
- Learning Unreal Engine Game Development
- 例說FPGA:可直接用于工程項目的第一手經(jīng)驗
- Mastering XenApp?