Antworter: this JavaScript

Beitrag lesen

Ich weiß ja nicht genau, was Du machst. Aber:

function Grafik( jsonData, width, height) {
        this.maxLabel = 150;
        this.init = function() {
                console.log( this.maxLabel);
        }
}
grafik=new Grafik;
grafik.init();

schreibt mir bei einem Test mit node brav "150" in die Konsole:

~> node test.js
150