Skip to content

Instantly share code, notes, and snippets.

@pphetra
Created June 22, 2013 06:43
Show Gist options
  • Select an option

  • Save pphetra/5836123 to your computer and use it in GitHub Desktop.

Select an option

Save pphetra/5836123 to your computer and use it in GitHub Desktop.
Ext.define('Counter', {
count: 0,
constructor: function(num) {
this.count = num;
},
inc: function() {
this.count++;
}
});
c = Ext.create('Counter', 200);
c.inc();
alert(c.count);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment