if(typeof window !== undefined) {
console.log("this should print only if window object actually exists")
}
Can somebody tell me why NodeJS (0.6.5) is not working correctly when checking if window is not defined? If you call typeof window, you get undefined but still condition above fails to work. Any ideas?
typeof returns a string