How do I determine if variable is undefined or null?
undefined
null
My code is as follows:
var EmpN
To test if a variable is null or undefined I use the below code.
if(typeof sVal === 'undefined' || sVal === null || sVal === ''){ console.log('variable is undefined or null'); }