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

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
主站蜘蛛池模板: 洛川县| 禹城市| 泸水县| 高要市| 康马县| 西宁市| 闻喜县| 柘荣县| 枣阳市| 永州市| 兴文县| 额尔古纳市| 南陵县| 丹阳市| 大同市| 荃湾区| 柯坪县| 蒲江县| 通州市| 陵川县| 南雄市| 青神县| 舒城县| 昔阳县| 华池县| 贵州省| 阆中市| 漳州市| 依安县| 温宿县| 广昌县| 阿图什市| 咸阳市| 宁明县| 苏尼特左旗| 凌云县| 东光县| 微山县| 福海县| 内黄县| 龙川县|