show = function() {
    // alert('button is pressed!!!');

    if (document.getElementById('greenItem').checked) {
        document.getElementById('results').innerHTML = "Green is checked!!!";
    }
    else if (document.getElementById('blueItem').checked) {
        document.getElementById('results').innerHTML = 
            "Maybe blue is checked!!!";
    }
    else {
        document.getElementById('results').innerHTML = 
            "red is checked!!!";
    }

    if (document.getElementById('vanillaItem').checked) {
        document.getElementById('results').innerHTML = 
          document.getElementById('results').innerHTML + "<br>Vanilla is checked!!!";
    }

    if (document.getElementById('chocolateItem').checked) {
        document.getElementById('results').innerHTML += "<br>Chocolate is checked!!!";
    }

    if (document.getElementById('kiwiItem').checked) {
        document.getElementById('results').innerHTML += "<br>Kiwi is checked!!!";
    }

}

init = function() {
    document.getElementById('showButton').addEventListener('click', show);
}
window.addEventListener('DOMContentLoaded', init);