Advertisement
fbinnzhivko

asss

Sep 29th, 2016
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function properties(input) {
  2.  
  3.     let x1 = String(input[0]);
  4.     let x2 = String(input[1]);
  5.     let x3 = String(input[2]);
  6.     let x4 = String(input[3]);
  7.     let x5 = String(input[4]);
  8.     let x6 = String(input[5]);
  9.  
  10.     return JSON.parse(`{ "${x1}": "${x2}", "${x3}": "${x4}", "${x5}": "${x6}" }`)
  11. }
  12. console.log(properties(['name', 'Pesho', 'age', '23', 'gender', 'male']));
  13. console.log(properties(['ssid', '90127461', 'status', 'admin', 'expires', '600']));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement