Remove content in an Array

Currently I use an Array to manage ingame chat and commands.
How could I remove content from the Array without clearing the whole thing, or replace parts of the array with an alternate text? The script is written in js and in unity 4.3.2.

var array = new Array ();
array.Push(“Apple”);
array.Push(“Bean”);
array.Push(“Corn”);
Debug.Log(array); // Apple, Bean, Corn

    array[1] = "Dill";
    Debug.Log(array); // Apple, Dill, Corn

    array.RemoveAt(1);
    Debug.Log(array); // Apple, Corn

Please see the documentation here.