Thanks, I have a whole folder dedicated to MDN pages for fast reference.
So an operator is “global” because it is asking about a more general property of a data type and an object attribute is more specific to a particular value?
Operators are global because they can be applied anywhere, and in some cases on any type of data. Objects contain their data and methods and either they inherit from a built in class, or they are instances of a custom class.
I think @serraphus was meaning to ask why is
console.log(type newVariable); not written as
typeof is a global operator. It would make very little sense to have a
typeof method on every class, including the ones we create.