js基本功

https://developer.mozilla.org/en-US/docs/Web/JavaScript
https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Functions/Default_parameters
https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Functions/Arrow_functions
https://ithelp.ithome.com.tw/articles/10191549

定義 JavaScript 函數(Functions)的各種方式


https://medium.com/@chihsuan/%E5%AF%AB-react-components-%E8%A9%B2%E6%B3%A8%E6%84%8F%E7%9A%846%E5%80%8B%E5%9C%B0%E6%96%B9%E8%88%87%E6%8A%80%E5%B7%A7-faa2bb87a18e

function g({name: x}) {
console.log(x);
}
g({name: 5})

1.函數運算式一定要看
2.箭頭函數

(function($) {
// Here “$” is a jQuery reference
})(jQuery)
基本上是()(para)匿名方法(anonymous function),傳承jQuery的函式庫,jQuery plugins都是用這樣的架構。

————————————————————————————————

function g({name: x}) {
console.log(x);
}
g({name: 5})