Chrome's Javascript console: what does it output in terms of objects?

前端 未结 3 475
广开言路
广开言路 2021-01-21 02:22

From the javascript console in Chrome:

> function Person(name){this.name=name;}
undefined

At this point, Person.prototype should be an empty

3条回答
  •  花落未央
    2021-01-21 02:47

    Chrome's console is a developer tool. It is meant to show in-depth info. In this case, you're looking at the pre-defined properties of the class you just defined.

提交回复
热议问题