TIL a quick way to log out [object object]
POSTED ON:
TAGS: javascript console object
const o = {
u: {
l: { course: 'node.js', a: { b: {}}}
}
}
// how to avoid [object object]
// JSON.stringify(value, replacer, space)
console.log(JSON.stringify(o, null, 2))
Related TILs
Tagged: javascript