箭頭函數(shù)練習(xí)的答案中 x,y的賦值和題目中不等價(jià)
const calculate = (x, y, z) => {
x = typeof x !== 'number' || 0
y = typeof y !== 'number' || 6
return x % y === z
}
需要修改一下
const calculate = (x, y, z) => {
x = typeof x !== 'number' ? 0 : x;
y = typeof y !== 'number' ? 6 : y;
return x % y === z;
}
ES6這些就夠了剛開(kāi)始用Vue或者React,很多時(shí)候我們都會(huì)把ES6+這位大兄dei加入我們的技術(shù)棧中。但是ES6+那么多那么多新特性,我們真的需要全部都掌握嗎?秉著二八原則,掌握好常用的...