forked from QDMarkMan/CodeBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Sep 21, 2018
1 parent
c8010f5
commit cd7a598
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 捋清楚ES6中的class | ||
|
||
在近期工作中开始使用```class```这个关键字。便顺手总结了一些 | ||
|
||
## 关于类 | ||
|
||
> ECMAScript 2015 中引入的 JavaScript 类实质上是 JavaScript 现有的基于原型的继承的语法糖。类语法不会为JavaScript引入新的面向对象的继承模型。 --来自MDN | ||
从上面这句话我们呢可以明确得看出,ES6中出现得类只是一个 **特殊得函数**。也就是说它并不是想Java等强类型中得class那样是个面向对象得继承模型。它实质上仅仅是一个语法糖而已。 | ||
|
||
### 基础知识 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters