String Methods Flashcards

1
Q

How would I get the length of a string?

A

string.length

The length of an empty string is 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How would I get the character at a specific index in a string?

A

string.charAt(index)
Note, last

How well did you know this?
1
Not at all
2
3
4
5
Perfectly