function createMenu(){ return /*html*/ `
`; } function updateViewHome(){ document.getElementById('app').innerHTML = /*HTML*/ `

Hello World!

${createMenu()} `; } function updateViewRules(){ app.innerHTML = /*HTML*/ `

Hello from rules

${createMenu()}
  1. Nummer: ${model.input.rules.numWinners}

`; } function updateViewList(){ let html = ''; const employees = model.employees; for (let i = 0; i < employees.length; i++){ const person = employees[i]; html += /*html*/ `
  • ${person.name}
  • `; } app.innerHTML = html + 'This is the list ' } function showWinnersView(){ let winners = []; let num = model.input.rules.numWinners; for (i = 0; i < num; i++){ index = Math.floor(Math.random() * (model.employees.length)); console.log(index) winners.push(model.employees[index]) } for (i = 0; i < winners.length; i++){ app.innerHTML += /*html*/ `

    ${winners[i].name}

    `; console.log(winners[i].name)} }