<ul id="menu" class="menu"></ul>
function MenuView (obj) {
return `<li id="${Object.keys(obj)}">${Object.values(obj)}</li>`
}
const fetchMenu = async (name) =>{
const url = `https://testprese.firebaseio.com/${name}/.json`;
const response = await fetch(url);
return await response.json();
}
(async ()=>{
const menu = await fetchMenu ("menu");
let list = '';
menu.forEach((item) => {list += MenuView(item);});
document.getElementById('menu').innerHTML = list;
})();