"I'm getting an 'index out of bounds' error, but I see why," Steven says.
"Let's take a look," says Barbie.
Steven looks on as Barbie steps through the code line by line.  "Here," she says, pointing to the screen.  "Your 'for' loop ends with '<= array.length' instead of just '<'.  Since arrays index from 0, and the length counts from 1, on the last time through it's looking for an index that isn't there.
"Oh, I see it now.  Thanks Barbie, you really saved my ass."

flag as inappropriate

Create your own!
      "I'm getting an 'index out of bounds' error, but I see why," Steven says.
"Let's take a look," says Barbie.
Steven looks on as Barbie steps through the code line by line.  "Here," she says, pointing to the screen.  "Your 'for' loop ends with '<= array.length' instead of just '<'.  Since arrays index from 0, and the length counts from 1, on the last time through it's looking for an index that isn't there.
"Oh, I see it now.  Thanks Barbie, you really saved my ass."