console.dir()和dir()

来自MDN的定义

The Console method dir() displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.

In other words, console.dir() is the way to see all the properties of
a specified JavaScript object in console by which the developer can
easily get the properties of the object.

通过它,我们可以看到一个节点对象的全部属性。
console.dir()和dir()
其实dir()也一样
console.dir()和dir()
在别的文档中,我也有反复看到

dir(object) 显示所有指定对象的属性的对象样式列表。此方法等同于 Console API 的 console.dir() 方法。

dir(object) 将指定对象的所有属性显示为对象样式的列表。 此方法是Console API的console.dir()方法的别名。

不过
console.dir()和dir()
真是让人头大。。。