When I am running this piece of code in JSEditor.
var obj = {};
console.log(obj);
obj.foo = 'bar';
The o/p is : [object Object]
While the same code in the console tab is giving me this o/p:
{}
"bar"
When I am running this piece of code in JSEditor.
var obj = {};
console.log(obj);
obj.foo = 'bar';
The o/p is : [object Object]
While the same code in the console tab is giving me this o/p:
{}
"bar"
In node js
console
instance configured to write to process.stdout
and process.stderr
.
The global console can be used without calling require('console')
.
var p={}
console.log
function uses process.stdout.write();
process.stdout
So you will get object
after writing the value