ramsess90

12. Assign Properties

Jan 19th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function assignProperties(input) {
  2.     let result =`{ ${input[0]}: '${input[1]}', ${input[2]}: '${input[3]}', ${input[4]}: '${input[5]}' }`;
  3.     console.log(result);
  4. }
  5.  
  6. assignProperties(['name', 'Pesho', 'age', '23', 'gender', 'male']);
Advertisement
Add Comment
Please, Sign In to add comment