JS String Flashcards

0
Q

string.length

A

Return’s string’s length

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

string.constructor

A

Returns string’s constructor function

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

string.prototype

A

Allows you to add properties and methods to an object

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

string.charAt(index)

A

Returns character at the specified index

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

string.charCodeAt(index)

A

Returns Unicode of character at specified index

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

string.concat(string 1, string 2, …, stringX)

A

Joins two or more strings and returns new joined string.

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

string.fromCharCode(n1, n2, …, nX)

A

Converts Unicode values to characters

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

string.indexOf(searchvalue, start)

A

Returns the position of the first 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

string.lastIndexOf(searchvalue, start)

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

string.localeCompare(compareString)

A

Compares two strings in current locale

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

string.match(regexp)

A

Searches 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

string.replace(searchvalue, newvalue)

A

Searches a string for a specified value or 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
12
Q

string.search(searchvalue)

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
13
Q

string.slice(start, end)

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
14
Q

string.split(separator, limit)

A

Splits a string into an array of substrings

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

string.substr(start, length)

A

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

16
Q

string.toLocaleLowerCase()

A

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

17
Q

string.toUpperCase()

A

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

18
Q

string.toLowerCase()

A

Converts a string to lowercase letters

19
Q

string.toString()

A

Returns the value of a String object

20
Q

string.toUpperCase()

A

Converts a string to uppercase letters

21
Q

string.trim()

A

Removes whitespace from both ends of string

22
Q

string.valueOf()

A

Returns the primitive value of a string object