Advertisement
ilianrusev

calorie

Jan 13th, 2022
22
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(arr) {
  2. let obj = {};
  3. for (let i = 0; i < arr.length - 1; i += 2) {
  4.  
  5. obj[arr[i]] = Number(arr[i + 1])
  6. }
  7. console.log(obj);
  8. }
Advertisement
RAW Paste Data Copied
Advertisement