diff --git a/js/simplecalculator.js b/js/simplecalculator.js
index 87360b7..0cd4808 100755
--- a/js/simplecalculator.js
+++ b/js/simplecalculator.js
@@ -44,7 +44,7 @@
       else if (operators.indexOf(btnVal) > -1) {
         // Operator is clicked
         // Get the last character from the equation
-        var lastChar = inputVal[inputVal.length - 1];
+         lastChar = inputVal[inputVal.length - 1];
 
         // Only add operator if input is not empty and there is no operator at the last
         if (inputVal != '' && operators.indexOf(lastChar) == -1)
