function initDigits() {
        let digitButtons = document.getElementsByClassName("digit");
        let len = digitButtons.length;
        //console.log("A");
        for (i = 0; i < len; i++) {
            let num = digitButtons[i].textContent;
            //console.log("Adding listener to " + num);
            digitButtons[i].addEventListener("click", function () { pressed(num); });
        }
    }
/* assign actions to buttons and init calc */
assign actions to buttons and init calc
assign actions to buttons and init calc
function initDigits() {
        let digitButtons = document.getElementsByClassName("digit");
        let len = digitButtons.length;
        for (i = 0; i < len; i++) {
            let num = digitButtons[i].textContent;
            digitButtons[i].addEventListener("click", function () { pressed(num); });
        }
    }
function initDigits ( ) { let digitButtons = document . getElementsByClassName ( "digit" ) ; let len = digitButtons . length ; for ( i = 0 ; i < len ; i ++ ) { let num = digitButtons [ i ] . textContent ; digitButtons [ i ] . addEventListener ( "click" , function ( ) { pressed ( num ) ; } ) ; } }
assign actions to buttons and init calc
assign actions to buttons and init calc
//console.log("A"); //console.log("Adding listener to " + num);