I need your little help to create the obj object you see on the code below.
// let arr1 = ['Monday', ['Pasta', 'Watermelon', 'Milk']],
// let arr2 = ['Tuesday', ['Cookies', 'Chips', 'Peach']]
const obj = {
"Monday": ['Pasta', 'Watermelon', 'Milk'],
"Tuesday": ['Cookies', 'Chips', 'Peach']
};
for (const [key, value] of Object.entries(obj)) {
console.log(`${key} -> ${value}`);
}
Given arr1 and arr2 I have to create the obj object shown.
Can anyone help me please?