- 1
What's the problem?
5 Réponses
+ 6
// Use (for in) loop, for in loop is used to print all your object values. I solve yr problem below
for(var newvar in userData )
{
console.log(userData [newvar]+"</br>");
}
+ 4
Yes its possible to print key also.Kim Jonas Cabugayan .
for(var newvar in userData )
{
console.log(newvar+"-" + userData[newvar]
+"</br>"
);
}
+ 2
you can't print object like that you have to give the refrence what you wanna print.
like this
console.log(userData.username);
console.log(userData.userID);
if you wanna print all you can use for example Map.
+ 1
To print total values of object , try :
Values:
console.log(Object.values(userData));
string form :
console.log(JSON.stringify(userData));
0
Is it possible to print with username, userID etc..
To knows whose who?