0
Console.log(group) returns object Object.
Tried this code. Var group = {}; group.love = 2; group.turn = 3; Console.log(group); Console return -->> object Object What is the error?
8 ответов
+ 2
No error ,use JSON.stringify(group) to see the values
+ 1
Abhay I tried the code in codepen.io , it showed me the object values, properly.
+ 1
Lucifer It stringifies the values ,you still need to use console.log to print to it to the console
console.log(JSON.stringify(group))
It doesn't works here for some reason which I am unaware of :-\
0
Abhay So, I can't use Console.log?
0
Abhay I tried JSON.stringify(group) it isn't working
0
Abhay thankyou brother.
0
✌️
0
The code should looks like as follows and then will work here on the Sololearn‘s Playground:
var group = {};
group.love = 2;
group.turn = 3;
console.log(group);