javascript - js中[object Object]表示什么?为何第一个o小写,第二个O大写?
PHP中文网
PHP中文网 2017-04-10 12:48:00
0
1
740

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

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
Peter_Zhu

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template