Update/Replace value in ArrayList

I am using javascript and I have an array list populated already. I know the index that I want to replace and for some reason I cant. I just started using array lists so there a little new to me. How do I replace an existing value in an array list.

This is what I currently have that isnt working:

ArrayList[index] = "new value that will replace the old on"; 

Is there some other way this has to be done?

You should never have started using ArrayLists. Generic Lists are better.

That said, ArrayList is the class, not an instance of the class. If you went the naming from your other example, it would be as simple as

myArrayList[index] = "new value that will replace the old on";