That fixes up the issues that JSHint cares about, so now we can move on to fixing more subtle issues.

The variable names aren't all that meaningful as they currently are so I suggest that we instead of Rsum and R, we use more meaningful variable names, such as numbersToAdd and sum instead. They also shouldn't begin with an uppercase letter, as that is normally reserved for constructor functions.

We shouldn't use multiple var statements in the same section of code, because that tempts us to inappropriate use them separately in different places, so we should declare variables in one comma-separated var statement instead.

That original new Array(5) as well as [5] doesn't declare an array of size five, but instead declares an array and puts the number 5 in to the first index, at index 0. We can assign those other array values from there too, and because arrays start their numbering from 0, that is where we should do our looping from too, by starting at 0 and looping while i is less than the length of the array.

And as a final touch, I prefer instead of ++ to use +=1 because it's more expressive about what it does, and is easier to modify later on too.