首页 > js中[object Object]表示什么?为何第一个o小写,第二个O大写?

js中[object Object]表示什么?为何第一个o小写,第二个O大写?

var a = {} a.toString() 将会返回 [object Object],为何会第一个o小写,第二个大写?[object Object]到底是含义是啥?


If this method is not overridden in a custom object, toString() returns "[object type]", where type is the object type.

MDN上的解释 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString

【热门文章】
【热门文章】