箭头函数的特色/做用

1、箭头函数的特色 箭头函数是匿名函数vue 1. 箭头函数使表达更加简洁,隐式返回值 const isEven = n => n % 2 === 0; const square = n => n * n; 箭头函数的一个用处是简化回调函数,以下:数组 // 正常函数写法 [1,2,3].map(function (x) { return x * x; }); // 箭头函数写法 [1,2,
相关文章
相关标签/搜索