Currently, I am developing a web application using reactjs. In my project, I have an array defined as:
let arr = ["name","message", etc...];
My goal is to convert this array into an object that looks like the following:
let desired = { name:'', message:'' };
Despite trying different methods, unfortunately, none of them have achieved the desired result.