title: What is globalOrWindow object and whats its purpose?
body: <p>I recently encountered this error while trying to run my react-native example.</p>
  <p><code>TypeError: undefined is not an object (evaluating 'globalOrWindow.navigator.userAgent.toString')</code></p>
  <p>So, what is globalOrWindow object and when does this error occur?</p>