ES6 箭頭操做符 =>

相似於C#的lambda表達式, 操做符左邊的是輸入的參數, 而右邊則是用來進行操做以及返回的值 input =>outputsphp let array = ['a','b','c'] //傳統寫法 array.forEach(function(v,i){ console.log(v) }) //ES6 array.forEach((value,index) =>{ consol
相關文章
相關標籤/搜索