Noob javascript, why is this firing onload?
<p>So I dont understand why the console logs 1 right away onload or something when i have <code>one.onclick = alterIt(1)</code> shouldn't it wait till i click <code>one</code>. Anyway, obviously I am not ver good at javascript, thanks for your help.</p>

<pre><code>window.onload = initialize;
function initialize() {
    if (1 == 1){
        calculation();           
    }
}
function calculation() {
    var one = document.getElementById('one');
    one.onclick = alterIt(1);
}

function alterIt(x) {
    console.log(x);
}
</code></pre>
