// name
const f1 = ({ name }) => { return "hello " + name + "!!" }
obj = { age: 12, name: 'hoge' }
f1(obj)
> "hello hoge!!"
var o = {p: 42, q: true};
var {p, q} = o;
console.log(p); // 42
console.log(q); // true
JavaScript45(ES2015,ES2016,ES2017)JavaScript
(JavaScriptJavaScript 3 ――ES2015 )