Obtain Undefined Value With The Void Operator
The void
operator takes any expression, evaluates it, and then results in the undefined
value. A common use of the void
operator is to get the primitive undefined
value in a consistent way.
This is handy for instances where you need to check if a value is undefined
:
Last updated