I'm taking a c# course and it has given me some code I copy and paste and some I do myself. Anyways, I don't understand in this for() loop why would we subtract 1 from the int i = target.Length property?
static string reverseString(string target)
{
String result = "";
// walk the target string backwards
for (int i = target.Length - 1; i >= 0; i--)
{
// add this letter to the result
result += target[i];
}
// return the result to the calling code
return result;
}