Trying to create a page using Javascript. when I try to append HTML into the main div I can see the HTML but I’m seeing undefined in the first line of the document.
const letterArry = [
{ name: 'A', id: 'a', soundtype: 'one' },
{ name: 'B', id: 'b', soundtype: 'two' }
];
let eleOne = document.getElementById('app');
eleOne.innerHTML = letterArry.map((i) => {
let html;
return (html += `<div class={alphabets}>
<ul>
<li id= ${i.id}>
${i.name} ${i.soundtype}
</li>
</ul>
</div`);
})```
All I'm trying to do is create a list item, I don't have any console logs in the file or browser.
can someone please help to understand why I'm seeing undefined in the top line?
[code snippet](https://stackblitz.com/edit/js-jfz9dk?file=index.js)