What does [object Object] mean?

后端 未结 10 2229
醉酒成梦
醉酒成梦 2020-11-22 03:22

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:



        
10条回答
  •  清歌不尽
    2020-11-22 04:27

    I think the best way out is by using JSON.stringify() and passing your data as param:

    alert(JSON.stringify(whichIsVisible()));
    

提交回复
热议问题