So, I had the very tiny, but hard for me task from my last interview. I just itreseted in how to solve it. I think that we need to implement the recursion in this task, but I do not know it clearly.
The task:
let arr = [{name: 'width', value: 300}, {name: 'height', value: 100}];
On output we must have:
let obj = {width:300, height: 100};
The count of array objects can be infinity.
P.S. I'll be pleased if you provide me with link on knowleges to how make this task done.
Thank you.