Guest User

Untitled

a guest
Feb 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function test_es5(obj){
  2. var a = obj.a;
  3. console.log(obj);
  4. console.log(a);
  5. }
  6.  
  7. function test_es2015({a}){
  8. console.log(arguments[0]);
  9. //console.log(obj); objも分割代入と一緒に定義する方法はありますか?
  10. console.log(a);
  11. }
  12.  
  13. var obj = {a:100};
  14. test_es5(obj);
  15. test_es2015(obj);
Add Comment
Please, Sign In to add comment