Skip to content

TypeScript code snippet – How to know if window exists in nodejs?

if(typeof window !== 'undefined') {
  console.log("this should print only if window object actually exists")
}
See also  Converts Fahrenheit to Celsius in Python

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.