Null vs Undefined


Null vs Undefined

定義 | Definition


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


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

  • 145
Loading comments...

More from Danny Huang