Question: check if variable is undefined es6?
Answer: So the correct way to test undefined variable or property is using the typeof operator, like this: if(typeof myVar === 'undefined') .