How to check for an undefined or null variable in JavaScript?
We are frequently using the following code pattern in our JavaScript code if (typeof(some_variable) != ‘undefined’ && some_variable != null) { // Do something with some_variable } Is there a less verbose way of checking that has the same effect? According to some forums and literature saying simply the following should have the same effect. … Read more