js/calc-controller.js
/* Bind listener and handler to number button. */
Bind listener and handler to number button.
Bind listener and handler to number button .
function numberController() {
    view.nums.forEach((num) => {
        num.addEventListener('click', () => {
            model.input(num.dataset.value);
            show();
            view.clear.dataset['state'] = 'C';
            view.clear.innerHTML = 'C';
        }, false);
    });
}
function numberController ( ) { view . nums . forEach ( ( num ) => { num . addEventListener ( 'click' , ( ) => { model . input ( num . dataset . value ) ; show ( ) ; view . clear . dataset [ 'state' ] = 'C' ; view . clear . innerHTML = 'C' ; } , false ) ; } ) ; }
Bind listener and handler to number button.
Bind listener and handler to number button .
/* allow user to clear current input */