Null vs Undefined

10.08.2019

Null vs Undefined

定義 | Definition

Null

Null is supposed to signal that a variable has no value because the programmer purposefully cleared the value and set it to `null`.

Undefined

Undefined is supposed to mean a variable has no value (or a property does not exist) because the programmer has not yet assigned it a value (or created the property)

你知道Null 資料類別是Primitive嗎?

Null vs Undefined

By Danny Huang

Null vs Undefined

  • 394