You need to use <=
instead of <
to get it to run twice.
Edit: Alternatively, for(x=0; x < importedChar.numItems; x++) {
and then use x+1
when you need to use it, but in situations where you can avoid that, <=
is preferable.
Situations when you'd want the alternative usually arise when you need to access an index and a meaningful value (e.g. to print a human-friendly error message)