You need to sign in to do that
Don't have an account?

How to get character at index from a string
I have a String and I'm trying to get it's characters by index.
For some reason the method string.charAt(index) , doesn't return a letter, but a number..
Any idea how can I get the characters ?
For some reason the method string.charAt(index) , doesn't return a letter, but a number..
Any idea how can I get the characters ?
You may use the following code: str is the sample string ‘abcd’
str.split('') returns the list of characters that can be traversed {‘a’, ‘b’, ‘c’, ‘d’}