Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

《你不知道的JavaScript》——类和原型 | #3

Open
jc-wow opened this issue Aug 28, 2019 · 1 comment
Open

《你不知道的JavaScript》——类和原型 | #3

jc-wow opened this issue Aug 28, 2019 · 1 comment

Comments

@jc-wow
Copy link
Owner

jc-wow commented Aug 28, 2019

https://jc-wow.github.io/2019/08/26/%E3%80%8A%E4%BD%A0%E4%B8%8D%E7%9F%A5%E9%81%93%E7%9A%84JavaScript%E3%80%8B%E2%80%94%E2%80%94%E7%B1%BB%E5%92%8C%E5%8E%9F%E5%9E%8B/#more

1.类1.1 构造函数类实例是由一个特殊的类方法构造的,这个方法名通常和类名相同,被称为构造函数。这个方法的任务就是初始化实例需要的所有信息(状态)。类构造函数属于类,而且通常和类同名。此外,构造函数大多需要用new来调,这样语言 引擎才知道你想要构造一个新的类实例。

@jc-wow
Copy link
Owner Author

jc-wow commented Sep 9, 2019

test comment

@jc-wow jc-wow mentioned this issue Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant