Yogesh Chavan
1 min readFeb 19, 2020

--

Sergey Lukin console.dir is used to get properties and methods of passed object. just passing object to console.log will not print the properties and methods. If you pass the primitive to console.dir, it will print out as it is as its not an object.. There is no easy way to get the properties and method of object so console.dir is useful in such cases

--

--

Yogesh Chavan
Yogesh Chavan

Responses (1)