var obj = { birth: 1990, getAge: () => new Date().getFullYear() - this.birth } console.log(obj.getAge()); //NaN
箭头函数暂时不能用作对象方法。
Sign in to make a reply
小云云揍斯额