ES6 Arrow Function All In One

ES6 Arrow Function All In One

this

const log = console.log;

const arrow_func = (args) => log(`args =`, args);
// OR
const arrow_func = args => log(`args =`, args);


const arrow_func = (arg1, arg2) => {
   log(`args =`, args);
   // return void 0;
}

應用場景


refs



©xgqfrms 2012-2020

www.cnblogs.com 發佈文章使用:只允許註冊用戶纔可以訪問!


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章