Web/14-前端面试/面试题积累/ES6.md
2021-04-10 11:03:41 +08:00

40 lines
339 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Class和普通构造函数有何区别
> 我们经常会用ES6中的Class来代替JS中的构造函数做开发
- Class 在语法上更加贴合面向对象的写法
- Class 实现继承更加易读易理解
- 更易于写 java 等后端语言的使用
- 本质还是语法糖使用 prototype