I'm struggling to display all the elements from the 'monday' array in the paragraph. How can I modify the code to achieve this and could you please explain how to combine these methods?
Thanks!
`
let mondayList = document.querySelector("firstPastList");
let monday = ["task1", "task2", "task3", "task4", "taks5", "task6", "taks7"];
let tuesday = ["task1", "task2", "task3", "task4", "taks5"];
let wendesday = ["task1", "task2", "task3", "task4", "taks5", "task6"];
const takePastList = monday
.map((mondays) => `<p id ="firstPastList">${mondays}</p>`)
.join("");
list.insertAdjacentHTML("afterend", <p>First Past List</p>);
<h1>My Task</h1>
<div id="tasks"></div>
<main> </main>
<p id="firstPastList">First Past List</p>
<h2>Done</h2>
`