How to use the function only when it is called?
<p>Sorry - i can not exactly explain the problem, so i show you an example.</p>

<pre><code>window.onload = function() {
    var obj = new classs(2);
    alert(obj.x2);

    function classs(value){
        this.value = value;

        var multiplication = function(value, n){
            console.log(n);
            return parseInt(value) * parseInt(n);
        }

        this.x1 = multiplication(this.value, 1);
        this.x2 = multiplication(this.value, 2);
        this.x3 = multiplication(this.value, 3);
    }
}
</code></pre>

<p>So i call only <code>obj.x2</code>, but <code>console.log(n);</code> prints 3 times. What i am doing wrong?</p>
