May I ask a size of undefined or null on a variable, which is bigger in javascript??
a = undefined
b = null
a > b ? undefined is bigger : null is bigger
May I ask a size of undefined or null on a variable, which is bigger in javascript??
a = undefined
b = null
a > b ? undefined is bigger : null is bigger
Types are incomparable. Thus, neither a nor b is the biggest:
> var a = undefined
undefined
> a
undefined
> var b = null
undefined
> b
null
> a > b
false
> b > a
false
(source: Developer Tools' console)
edit: if you're asking about the memory footprint, it depends on the implementation of the Javascript Engine you're using.