I have this method:
var stopwatch = function () {
this.start = function () {
(...)
};
this.stop = function() {
(...)
};
};
When I try to invoke it:
stopwatch.start();
I am getting Uncaught TypeError: Object (here is my function) has no method 'start'. What am I doing wrong?