官术网_书友最值得收藏!

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 and false
  • 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
主站蜘蛛池模板: 卫辉市| 新竹市| 洞口县| 晋州市| 汉源县| 抚州市| 牙克石市| 东丽区| 凤冈县| 喀喇沁旗| 招远市| 定西市| 科技| 法库县| 永登县| 东乡族自治县| 志丹县| 板桥市| 宜宾市| 周口市| 宜丰县| 宜都市| 白玉县| 岳阳县| 九台市| 大田县| 兴城市| 玉屏| 定西市| 增城市| 青川县| 平阳县| 鄂托克前旗| 元朗区| 周至县| 修武县| 馆陶县| 隆回县| 瑞丽市| 芦溪县| 息烽县|