DEV Community


Posted on


Javascript: Printing Object in Console

If you're trying to print object in console and you're getting [object Object], then most probably you're trying to print the object as a string value. Add comma(,), and not plus operator(+)


console.log('The value of object is: ' + obj) 


console.log('The value of object is: ' , obj)


Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.