MDN教程上的题目,如何将isShort函数转成箭头函数,请大家帮帮忙
用代码块功能插入代码,请勿粘贴截图
function isShort(name) {
return name.length < 5;
}
const shortNames = names.filter(isShort);
para.textContent = shortNames;
MDN教程上的题目,如何将isShort函数转成箭头函数,请大家帮帮忙
function isShort(name) {
return name.length < 5;
}
const shortNames = names.filter(isShort);
para.textContent = shortNames;