Currently, I am attempting to create a new array that is similar to the myCourses
array using the push method.
However, for some reason it only seems to be logging one string at a time instead of generating a new array that mirrors the myCourses
array:
let myCourses = ["Learn CSS Animations", "UI Design Fundamentals", "Intro to Clean Code"]
for (let i = 0; i < myCourses.length; i++) {
let newArray = []
newArray.push(newArray += myCourses[i])
console.log(newArray)
}