I am trying to alert a returned value from a function and I get this in the alert:
[object Object]
Here is the JavaScript code:
You are trying to return an object. Because there is no good way to represent an object as a string, the object's .toString() value is automatically set as "[object Object]".
.toString()
"[object Object]"