I would like to convert the following array to an array of objects:
let arr = ['tree', 'apple', 'orange']
to
arr = [
{value: tree},
{value: apple},
{value: orange}
]
My solution so far is:
let temp = [];
arr.forEach(x => {
temp.push({value: p});
});
arr = temp
how do I solve this problem with the array.map() functionality so I can just call
arr.map()...