Trying to use an array in my code. Where am I going wrong?

Code:
var Rsum = new Array(5);
var Rsum[1] = 6;
var Rsum[2] = 4;
var Rsum[3] = 7;
var Rsum[4] = 2;
var Rsum[5] = 8;
for (i = 1; i <= 5; i++){
     R = R + Rsum[i];
}//next i