I am a rookie practicing on some javascript. In one of the challenges, I plan to get an array of **[nav1, nav2, ...nav5]** using template string method to declare the variable (**'nav'+i**). Below codes gave me an error of "*Uncaught SyntaxError: Invalid left-hand side in assignment*".
What is the solution here? Please give me your advice and appreciate your time. / Thanks
const navItems = [];
for (let i=1; i<6; i++) {
`nav${i}` = document.getElementById(`nav-${i}`);
navItems.push(`nav${i}`);
}