Javascript how to fill an array?

Hi!
I´ve got Problems in Unity with Arrays.
I want to write a value into a position in an array. But it doesnt work. The Console outputs “null”.
Maybe you can help me!

function Start () {

}

function Update () {

}


var reihe1 : Array = new Array[5];


function OnGUI(){
    if( GUILayout.Button("Reihe 1")){
        PR1();
    }
}

function PR1(){
    if(reihe1[0]!=1 && reihe1[0]!=2){
        GameObject.Find("muenzen_rot").GetComponent.<Animation>().Play("1_1");
        reihe1[0]==1;
        print(reihe1[0]);
    }
    if(reihe1[0]==1 && reihe1[0]==2){
        GameObject.Find("rot12").GetComponent.<Animation>().Play("1_2");
        reihe1[1]==1;
    }
}

“=” assigns values

“==” compares values

In the snippet. Values aren’t being assigned, they are being compared.

reihe1[0]==1;

Should read:

reihe1[0]=1;