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.”
}
console.table(person);
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.”
}
console.table(person);
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:
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/