
var init = function () {

  //Declare local variables
    var equalsButton; //for querySelector
    var clearButton; //for querySelector
    var screenNumber; //Number displayed on screen
    var calculation = []; //Current calculation calculator
    var numberPressedLast = false;


  // Variable pointing to equals-button HTML element
  equalsButton = document.querySelector("#button-equal");

  // Variable pointing to AC-button HTML element
  clearButton = document.querySelector("#button-clear");

  //Event handler that adds the value of the clicked number button to the calculation
  var numberPressed = function(event) {
    var button = event.target;
    var text = button.textContent;

    if (numberPressedLast) {
      console.log(numberPressedLast);
      calculation[calculation.length - 1] += text;
    }
    else {
      console.log(numberPressedLast);
      calculation.push(text);
    }

    numberPressedLast = true;
    console.log(numberPressedLast);
    console.log(text + " CLICKED");
    console.log(calculation);
    console.log(numberPressedLast);
  };

  //Event handler that adds the value of the clicked operator button to the calculation
  var operatorPressed = function(event) {
    var button = event.target;
    var text = button.textContent;

    if (numberPressedLast) {
      calculation.push(text);
    }
    else {
      calculation[calculation.length - 1] = text;
    }

    numberPressedLast = false;
    console.log(text + " CLICKED");
    console.log(calculation);
    console.log(numberPressedLast);
  };

  //Event handler that alerts the value of the clicked equals button to the screen
  var equalPressed = function(event) {
    var button = event.target;
    var text = button.textContent;
    console.log(text + " CLICKED");
    console.log(calculation);
  };

  //Event handler that alerts the value of the clicked number button to the screen
  var clearPressed = function(event) {
    var button = event.target;
    var text = button.textContent;
    calculation = [];
    numberPressedLast = false;
    console.log(text + " CLICKED");
    console.log(calculation);
  };

  // Loop over every element in document. Finds every element w. matching CSS class and binds event listener to 'click' event on that button.  When element is clicked, function alertButtonValue is called.
  [].forEach.call(document.querySelectorAll('.button-number'), function(element){
    element.addEventListener('click', numberPressed);
  }, false);

  [].forEach.call(document.querySelectorAll('.button-operator'), function(element){
    element.addEventListener('click', operatorPressed);}, false);

  // Bind event listener to equals-button
  equalsButton.addEventListener('click', equalPressed, false);

  // Bind event listener to AC-button
  clearButton.addEventListener('click', clearPressed, false);
};

window.onload = init;

@@ -723,46 +723,8 @@
 ) %7B%0A
-      console.log(numberPressedLast);%0A
     
@@ -791,46 +791,8 @@
 e %7B%0A
-      console.log(numberPressedLast);%0A
     
@@ -858,44 +858,8 @@
 ue;%0A
-    console.log(numberPressedLast);%0A
     
@@ -924,44 +924,8 @@
 n);%0A
-    console.log(numberPressedLast);%0A
   %7D;
@@ -1357,44 +1357,8 @@
 n);%0A
-    console.log(numberPressedLast);%0A
   %7D;

Remove console.log messages from event handler functions