String Methods Flashcards

1
Q

charAt()

A

Returns the character at the specified index (position)

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

charCodeAt()

A

Returns the Unicode of the character at the specified index

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

concat()

A

Joins two or more strings, and returns a new joined strings

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

endsWith()

A

Checks whether a string ends with specified string/characters

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

fromCharCode()

A

Converts Unicode values to characters

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

includes()

A

Checks whether a string contains the specified string/characters

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

indexOf()

A

Returns the position of the first found occurrence of a specified value in a string

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

lastIndexOf()

A

Returns the position of the last found occurrence of a specified value in a string

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

localeCompare()

A

Compares two strings in the current locale

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

match()

A

Searches a string for a match against a regular expression, and returns the matches

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

repeat()

A

Returns a new string with a specified number of copies of an existing string

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

replace()

A

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced

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

search()

A

Searches a string for a specified value, or regular expression, and returns the position of the match

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

slice()

A

Extracts a part of a string and returns a new string

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

split()

A

Splits a string into an array of substrings

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

startsWith()

A

Checks whether a string begins with specified characters

17
Q

substr()

A

Extracts the characters from a string, beginning at a specified start position, and through the specified number of character

18
Q

substring()

A

Extracts the characters from a string, between two specified indices

19
Q

toLocaleLowerCase()

A

Converts a string to lowercase letters, according to the host’s locale

20
Q

toLocaleUpperCase()

A

Converts a string to uppercase letters, according to the host’s locale

21
Q

toLowerCase()

A

Converts a string to lowercase letters

22
Q

toString()

A

Returns the value of a String object

23
Q

toUpperCase()

A

Converts a string to uppercase letters

24
Q

trim()

A

Removes whitespace from both ends of a string

25
Q

valueOf()

A

Returns the primitive value of a String object