Advertisement
fbinnzhivko

1

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