Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function test_es5(obj){
- var a = obj.a;
- console.log(obj);
- console.log(a);
- }
- function test_es2015({a}){
- console.log(arguments[0]);
- //console.log(obj); objも分割代入と一緒に定義する方法はありますか?
- console.log(a);
- }
- var obj = {a:100};
- test_es5(obj);
- test_es2015(obj);
Add Comment
Please, Sign In to add comment