Question: JSLint is not passing this as a valid code:

```
/* global someVar: false */
if (typeof someVar === "undefined") {
    var someVar = "hi!";
}

```

What is the correct way?

Answer: 
try 

```
variableName in window

```

or

```
typeof window[variableName] != 'undefined'

```

or

```
window[variableName] !== undefined

```

or

```
window.hasOwnProperty(variableName)

```
If you are not sure whether a global variable is defined, you can always try accessing it and see what happens.

```
function node_env(name) {
    try {
        return process.env[name];
    } catch (ignore) {}
}

```