window.onload = function() {
    var pushCharacter = function(character) {
        var input = document.querySelector("#display");
        input.value = input.value + character;
    };

    var buttons = document.querySelectorAll(".button");
    for (var i = 0; i < buttons.length; i++) {
        buttons[i].onclick = function() { pushCharacter(buttons[i].innerHTML); }
    };

    var calculate = function() {
        var input = document.querySelector("#display");
        input.value = eval(input.value).toString();
    };
    var equalbutton = document.querySelector(".button-equals");
    equalbutton.onclick = calculate;

    var clear = function() {
        var input = document.querySelector("#display");
        input.value = "";
    };
    var clearbutton = document.querySelector(".clearbutton");
    clearbutton.onclick = clear;
};

@@ -26,20 +26,16 @@
 ) %7B%0A    
-var 
 pushChar
@@ -371,20 +371,16 @@
 %7D;%0A%0A    
-var 
 calculat
@@ -613,28 +613,24 @@
 ulate;%0A%0A    
-var 
 clear = func

remove var before functions