0
Why canât a string be used for this?
So hereâs the code to reverse a string. Why is a string the wrong data type? https://code.sololearn.com/c0eUPG2ry7MN/?ref=app
1 Answer
+ 3
If your string has a length of 5, then the max index will be 4. So you would need to start at str.length-1 to count down