Advance through array elements with math (++)?

Hey everyone.

Stupid-simple question here:

I’m using Javascript. I have an array of strings (var textArray). I have the GUI set up to display one string at a time (var activeText), starting with the first element (textArray[0]). When the player hits spacebar, I want to replace the current activeText with the next string in the array, preferably using something simple like ++ applied to the textArray element, but I have no idea what to apply the ++ to.

What’s the trick?

Thank you!

var textArray = [“stringone”, “stringtwo”, “stringthree”];
var i : int = 0;

Update() {
  if(GetKeyDown(KeyCode.Space)){
    i++;    
  }

  activeText = textArray*;*

}
?