recherche

Maison  >  Questions et réponses  >  le corps du texte

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

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

PHP中文网PHP中文网2895 Il y a quelques jours741

répondre à tous(1)je répondrai

  • 天蓬老师

    天蓬老师2017-04-10 12:50:00

    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

    répondre
    0
  • Annulerrépondre