var name = "Smith"
var numLoops = String.length(name)
for (I = 0; I <= numLoops; I++)
{
Debug.trace(I + "\n")
}
Note: In this example, the Return Value of the length function is 5, note the loop will repeat six times because the first loop starts at 0.