在javascript函数中,我们可以像,
/**
* @param {number} x the first number to add
* @param {number} y the second number to add
* @returns total of given 2 numbers
*/
let f = (x, y) => {
return x + y;
}
是否有任何标准方法或建议来记录ES6类属性(例如。。
this.name
,
this.title
)因为任何类属性都可以在不同的方法中定义,因此很难跟踪。