One of my alerts is giving the following result:
[object Object]
What does this mean exactly? (This was an alert of some jQuery object.)
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
It means you are alerting an instance of an object. When
alert
ing the object,toString()
is called on the object, and the default implementation returns[object Object]
.If you want to inspect the object, you should either
console.log
it,JSON.stringify()
it, or enumerate over it’s properties and inspect them individually usingfor in
.