标签: javascript oop
这两者之间有什么区别,哪个更常用,效率更高?
class Person { constructor(name, age) { this.name = name this.age = age } }
OR
function Person(name, age) { this.name = name this.age = age }