#Having trouble excluding the first instance of a letter when replacing, any ideas on how to fix this

1 messages · Page 1 of 1 (latest)

rare sequoia
#

I don' t know why my first if statement does exclude it

simple dove
#

Hmm. Delete it and start over

rare sequoia
simple dove
#

If you can use indexOf(), you don't need a loop

rare sequoia
#

i think for the assignment it wants me to traverse through string with for loop

simple dove
#

Ah sorry, I didn't understand what was wanted

rare sequoia
#

oh your fine

#

i feel so stupid ive been stuck on this for like 2 hours

simple dove
#

Have a boolean that remembers whether the first letter has been met

#

Don't indexOf(). Don't substring()

#

And prefer to convert the "letter" Strings to chars for easy comparison