js/app.js
// remember this is the event handler for showning results
remember this is the event handler for showning results
remember this is the event handler for showning results
function handleResults(event) {
    if (clicksMade === ATTEMPTS_ALLOWED) {
        for (let i = 0; i < allProducts.length; i++) {
            let li = document.createElement('li');
            console.log(allProducts[i]);
            li.textContent = `${allProducts[i].name} had ${allProducts[i].votes} votes, and was seen ${allProducts[i].views} times.`;
            results.appendChild(li);
        }
    }
}
function handleResults ( event ) { if ( clicksMade === ATTEMPTS_ALLOWED ) { for ( let i = 0 ; i < allProducts . length ; i ++ ) { let li = document . createElement ( 'li' ) ; console . log ( allProducts [ i ] ) ; li . textContent = ` ${ allProducts [ i ] . name } ${ allProducts [ i ] . votes } ${ allProducts [ i ] . views } ` ; results . appendChild ( li ) ; } } }
remember this is the event handler for showning results
remember this is the event handler for showning results