Object in javascript

If you have trouble understanding/visualizing objects in Javascript you can try console.table();

const person = {
name: “John Doe”,
age: 21,
address: “111 main st.”

Hey @firdavsiQ, I seems like that console.table() only logs a table using node. When you used a normal js environment, it will only give you a full list of the object. Here’s what it looks like on normal JS environment:

And here what it looks like when run using node:

1 Like

wow! what browser do you use? and os?

Well, the top image is using a browser, here’s the spec:
Browser: Chromium Edge 81
OS: Windows 10.

The second image is a screenshot of my text editor running Nodejs.
Text Editor: Visual Studio Code (https://code.visualstudio.org)
Node Version: 12.18.0
Learn more about Nodejs here: https://nodejs.org/en/about/

1 Like