Im trying to reprogram a calculator using the eventListener as it should make the code better overall. However I am having trouble getting the value from the html to use it in the javascript!
Here is the JS Fiddle http://jsfiddle.net/zrm9L0u9/
And here is the code
var input = document.getElementById("calculator").addEventListener("click", calc);
function calc(a) {
input = this.a;
console.log(input);
}
Thanks for your time