Skip to content

Commit

Permalink
Simplify counter example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jswanner committed Mar 23, 2012
1 parent fbc3843 commit d04093a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions demos/3-counter.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ <h1>Simple counter</h1>
var Counter = function () {
this.count = ko.observable(0);
this.increment = function () {
var current = this.count();
this.count(current + 1);
this.count(this.count() + 1);
};
};
ko.applyBindings(new Counter);
Expand Down

0 comments on commit d04093a

Please sign in to comment.