Created
December 24, 2009 06:32
-
-
Save kaievns/263054 to your computer and use it in GitHub Desktop.
Private method example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Klass = new Class((function() { | |
var private_method = function() { | |
// bla bla bla | |
}; | |
return { | |
initialize: function() { | |
this.bla = 'bla'; | |
private_method('bla', 'bla', 'bla'); | |
// or in context of the object | |
private_method.call(this, 'bla', 'bla', 'bla'); | |
} | |
}})()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment