how do I convert a string to an integer?

I have a string, “0”, and want to use it to reference an element in an array. How do I convert that to the integer 0?

if you write in c# you can use int.Parse(your_string), in javascript I think it is parseInt(your_string)

/ claus

int.Parse(string) works in Javascript as well.