Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
Global "window" object

The global window object stores properties specific to the environment (for example, window.innerHeight).

But if we print window to the console, we will see the properties highlighted in a different color.

enter image description here

These include Array, Object, and so on, although i thought they are internal objects.

I have a few questions:

  1. What are these "implicit" properties?
  2. Where do JS boundaries end and environment begin?
  3. Can I refer to Array in Node.js, for example?

Thank you.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In the early days of Javascript, there was one master global symbol and everything that was available in the global scope whether it was part of the language itself or part of the browser environment was a property of that master global.

In the browser, that master global is the window object. Thus, you see many things on the window object that are available globally like the Array constructor.

I would guess that this is a side effect of that fact that Javascript was first designed to run in a browser and was not initially a completely stand-alone language with a stand-alone specification.

More recent revisions to the language specification are not adding some new things to the window object any more. For example, when you declare an ES6 class such as:

class Foo {
    constructor(greeting) {
        this.greeting = greeting;
    }
}

You will not find Foo on the window object even though it may be globally available in the browser.

As others have said, the color difference in the debug output has to do with whether the symbols are enumerable or not which is a technical distinction on whether the property shows up in something like Object.keys() or a for/in loop. The property is still there and is accessible either way.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!