How can I change background-position with arrow-keys?
<p>Hi just started trying to learn a little javascript, now for my first programm I wanted to write code that moves the "background-position" when pressing arrow-keys.
So I hope one of you guys can help me to fix my code.</p>

<p>My (not so fancy) Code:</p>

<pre><code> var x = 0;
 var y = 0;

function GetChar (event){
        var keyCode = ('which' in event) ? event.which : event.keyCode;
        posy(move(keyCode, x, y))
        posx(move(keyCode, x, y))
    }


function move (key, x, y){
    if (key === 38){
        return y ++;
    } if else (key === 40){
        return y --;
    } if else (key === 39){
        return x ++;
    } if else (key === 37){
        return x --;
    } else{

    }
}

function posy(movy) {
    return body.style.background-position-y + movy * 100; 
}

function posx(movx) {
    return body.style.background-position-x + movx * 100; 
}
</code></pre>
