Question: I have read in this post ([Difference between Node object and Element object?](https://stackoverflow.com/questions/9979172/difference-between-node-object-and-element-object)) that "A node is the generic name for any type of object in the DOM hierarchy". So now I'm wondering: are there any objects in JavaScript that aren't nodes? Can you give examples?

Answer: 
Lots and lots of things in JavaScript are objects. For example, the following is an object:

```js
const obj = {};
```

As are many others, like the `window`, the global Array object, and so on.

Nodes are a *very specific type* of object. Only a relatively small proportion of objects developers use are node objects. Nodes are only found in a front-end environment when working with the DOM, like the following:

```js
const span = document.querySelector('span');
console.log(span.textContent);
```

```html
<span>foo</span>
```
The [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node) interface is used to represent DOM objects in the browser. All `Node` implementations are an `Object`, but not all `Object` types have browser DOM interfaces backing them.

There is a distinction between standard built-in objects and web interface objects.

[**Web APIs - Interfaces**](https://developer.mozilla.org/en-US/docs/Web/API#interfaces)

> 
> *Web APIs are typically used with JavaScript, although this doesn't always have to be the case.*
> 
> 
> 

[**Standard built-in objects**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects)

> 
> *For more information about the distinction between the [DOM](https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model) and core [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript), see [JavaScript technologies overview](https://developer.mozilla.org/en-US/docs/Web/JavaScript/JavaScript_technologies_overview).*
> 
> 
> 

Standard objects vs web interface objects
-----------------------------------------

For example, the JavaScript in Node.js differs slightly from browser JavaScript, because the JavaScript in node runs headless and does not rely on a browser to execute. Most of the web-specific interfaces do not exist in the standard Node.js library. For more information, see: [*Differences between Node.js and the Browser*](https://nodejs.dev/learn/differences-between-nodejs-and-the-browser)