es6經常使用語法

// 箭頭函數 let f = a => a + 1; // 等價於 var f = function(a) { return a + 1; } // 模版字符串 let a = 'react' let s = `hello ${a}`; // hello react // 解構賦值 let [lang, ...other] = ['js', 'java', 'react']; /
相關文章
相關標籤/搜索