Isaac
asked on
JavaScript code not working
Please explain whey the following does not execute.
https://jsfiddle.net/isogunro/f2qjoqbs/
Thanks!
var counterModule = (function() {
var counter = 0;
return {
incrementCounter: function () {
counter++;
alert(counter++);
},
resetCounter: function () {
counter = 0;
alert("counter value prior to reset: " + counter);
}
};
}
counterModule.incrementCounter();
counterModule.incrementCounter();
counterModule.incrementCounter();
counterModule.resetCounter();
https://jsfiddle.net/isogunro/f2qjoqbs/
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER