-Annie-

AssignProperties

May 26th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function assign(arr) {
  2.     let [prop1, value1, prop2, value2, prop3, value3] = arr;
  3.     let obj = {};
  4.     obj[prop1] = value1;
  5.     obj[prop2] = value2;
  6.     obj[prop3] = value3;
  7.    
  8.     return obj;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment