- Object/Oriented JavaScript
- Stoyan Stefanov
- 128字
- 2021-08-13 19:25:52
Primitive Data Types Recap
Let's quickly summarize what has been discussed so far:
- There are five primitive data types in JavaScript:
- number
- string
- boolean
- undefined
- null
- Everything that is not a primitive is an object
- The 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
推薦閱讀
- 社會(huì)科學(xué)數(shù)據(jù)處理軟件應(yīng)用
- CorelDRAW X6圖形設(shè)計(jì)立體化教程
- 商用級(jí)AIGC繪畫創(chuàng)作與技巧(Midjourney+Stable Diffusion)
- 移動(dòng)App測試的22條軍規(guī)
- Learning Ext JS 3.2
- 數(shù)碼攝影后期處理秘笈:Photoshop CC專業(yè)調(diào)色(第2版)
- 從零開始:Photoshop工具詳解與實(shí)戰(zhàn)
- Photoshop CS6從入門到精通
- UG NX 12.0完全自學(xué)寶典
- Plone 3 for Education
- AutoCAD 2016中文版基礎(chǔ)教程(全圖解視頻版)
- 手機(jī)/電腦雙平臺(tái)剪映短視頻后期編輯從新手到高手
- ICEfaces 1.8: Next Generation Enterprise Web Development
- SolidWorks 2017基礎(chǔ)與實(shí)例教程
- 攝影師的后期課:人像調(diào)色篇