String Methods Flashcards

(19 cards)

1
Q

at()

What does the above do in Javascript?

A

returns an indexed character from a string

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

charAt()

What does the above do in Javascript?

A

returns the character at a specified index (position)

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

charCodeAt()

What does the above do in Javascript?

A

returns the Unicode of the character at a specified index (position)

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

codePointAt()

What does the above do in Javascript?

A

returns the unicode value at an index (position) in a string

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

concat()

What does the above do in Javascript?

A

returns two or more joined strings

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

constructor

What does the above do in Javascript?

A

returns the string’s contructor function

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

endsWith()

What does the above do in Javascript?

A

returns if a string ends with a specified value

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

fromCharCode()

What does the above do in Javascript?

A

returns unicode values as characters

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

includes()

What does the above do in Javascript?

A

returns if a string contains a specified value

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

indexOf()

What does the above do in Javascript?

A

returns the index (position) of the first occurence of a value in a string

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

lastIndexOf()

What does the above do in Javascript?

A

returns the index (position) of the last occurence of a value in a string

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

length

What does the above do in Javascript?

A

returns the length of a string

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

localeCompare()

What does the above do in Javascript?

A

compares two strings in the current locale

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

match()

What does the above do in Javascript?

A

searches a string for a value, or a regular expression, and returns the matches

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

padEnd()

What does the above do in Javascript?

A

pads a string at the end

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

padStart()

What does the above do in Javascript?

A

pads a string from the start

17
Q

prototype

What does the above do in Javascript?

A

allows you to add properties and methods to an object

18
Q

repeat()

What does the above do in Javascript?

A

returns a new string with a number of copies of a string

19
Q

replace()

What does the above do in Javascript?

A

searches a string for a pattern, and returns a string where the first match is replaced