Today i caught myself writing the following two lines of code:
if (typeof a === 'undefined') { ... }
if (a === undefined) { ... }
and i was asking myself what exactly the difference is.
Is there any actual difference between these two approaches on checking if a variable is undefined?