Javascript

OOP

var Foo = function() {
    this.text = 'hello World';
    this.demo = function() {
        alert(this.text);
    };
}
Foo.prototype.Test = function(arg) {
    alert(this.text);
}

var bool=new Foo;
bool.demo();
bool.text = 'hallo Welt';
bool.Test();