Chapter 8 Flashcards

1
Q

Text contained within double or single quotation marks

A

string

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

Converts a JSON string value to an object

A

​parse()

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

Separates alternate sets of substrings in a regular expression

A

|

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

A standardized set of characters from many of the world’s languages

A

Unicode

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

Removes the last element from the end of an array

A

​pop()

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

​Combines array elements into a string

A

​join()

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

Compares strings according to the particular sort order of a language or country

A

localeCompare() method

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

Special character that defines pattern matching rules in a regular expression

A

metacharacter

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

Metacharacter that specifies the quantity of a match

A

quantifier

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

​Adds one or more elements to the end of an array

A

​push()

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

The ____ object contains methods and properties for working with regular expressions in JavaScript.

A

RegExp

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

To sort elements of an array alphabetically, you use the ____ method.

A

sort()

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

The fromCharCode() method is called a ____ method because it is not used as a method of any string objects (which can be literal strings or variables) in your scripts.

A

static

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

To allow a string to contain an alternate set of substrings, you separate the strings in a regular expression pattern with the ____ metacharacter.

A

|

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

The ____ method converts a text string to lowercase.

A

toLowerCase()

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

The String class ____ property returns the number of characters in a string.

A

length

17
Q

The ____ method adds one or more elements to the end of an array.

A

push()

18
Q

The ____ method constructs a text string from Unicode character codes that are passed as arguments.

A

fromCharCode()

19
Q

A pattern that matches the beginning or end of a line is called a(n) ____.

A

anchor

20
Q

The JavaScript String class includes the ____ method, which creates a new string by combining strings that are passed as arguments.

A

concat()

21
Q

The ____ method removes and returns the first element from the beginning of an array.

A

shift()

22
Q

You use ____ classes in regular expressions to treat multiple characters as a single item.

A

character

23
Q

Regular expression patterns consist of literal characters and ____.

A

metacharacters

24
Q

The ____ method of the String class returns the position number in a string of the first character in the argument.

A

indexOf()

25
Q

To manipulate arrays in your scripts, you use the methods and length property of the ____ class.

A

Array

26
Q

The ____ method converts a text string to uppercase.

A

toUpperCase()

27
Q

You use the ____ method of the String class to split a string into an indexed array.

A

split()

28
Q

The ____ method returns the position number in a string of the first instance of the first character in the pattern argument.

A

search(pattern)

29
Q

To convert a JavaScript object to a JSON string, you use the ____ method.​

A

​stringify()

30
Q

Characters contained in a set of parentheses within a regular expression are referred to as a subexpression or ____.

A

subpattern