0

I read the ECMAScript Doc and MDN Documents

In browser or node environment, Javascript provides some global objects like Array and they have functions like filter and map.

The question is: are these objects/functions part of the "Javascript Language" or are there just provided by the "environment"?

Jordumus
  • 2,763
  • 2
  • 21
  • 38
  • 1
    the answer is right in the title of the ECMAScript document. – pvg Nov 14 '17 at 13:25
  • Javascript interpreter itself is provided by "environment" – Maxim Nov 14 '17 at 13:28
  • Partly. `Array, Object, Map, Set, Number, String, Boolean, Math` (you can find them somewhere in the *global objects * section) are, the rest is not – Jonas Wilms Nov 14 '17 at 13:50
  • You say you read the ECMAScript spec. Well, everything in it is, by definition, the JavaScript language. Everything else (like browser or Node APIs) is, by the same definition, *not* part of the language. It's as simple as that. – Touffy Nov 14 '17 at 13:50

1 Answers1

0

Functions like filter and map are described in standards. This means that all browsers that follow those standards should implement them in the same way, making them act the same way, without exception.

For example, for filter, there is this page: here which explains the function, and at the bottom you can see links to the document which explains exactly how the function should behave, what parameters it should have, what it should return, etc.

Jordumus
  • 2,763
  • 2
  • 21
  • 38
  • This is all true, but no answer to the question. The DOM is standard but not part of the JavaScript language. – Touffy Nov 14 '17 at 13:46