Menu
I have a simple example to test the output of the map() function.
“`
const listItems = [‘one’,’two’,’three’,’four’,’five’].map( (item) => { return `<li> ${item} </li>` } );
document.body.innerHTML = `<ul>${listItems}</ul>`;
But the display on the screen shows extra commas (,) between the lines.
Where are they coming from? Are they because of the .map() output or because of the .innerHTML() ?