Filters
Question type

Study Flashcards

Match each statement below with correct item:

Premises
Compares strings according to the particular sort order of a language or country
Text contained within double or single quotation marks
A standardized set of characters from many of the world's languages
Metacharacter that specifies the quantity of a match
Special character that defines pattern matching rules in a regular expression
Separates alternate sets of substrings in a regular expression
Adds one or more elements to the end of an array
Removes the last element from the end of an array
Converts a JSON string value to an object
Combines array elements into a string
Responses
join()
localeCompare()method
metacharacter
pop()
|
parse()
Unicode
string
push()
quantifier

Correct Answer

Compares strings according to the particular sort order of a language or country
Text contained within double or single quotation marks
A standardized set of characters from many of the world's languages
Metacharacter that specifies the quantity of a match
Special character that defines pattern matching rules in a regular expression
Separates alternate sets of substrings in a regular expression
Adds one or more elements to the end of an array
Removes the last element from the end of an array
Converts a JSON string value to an object
Combines array elements into a string

What is the primary difference between the search()method and the indexOf()method?

Correct Answer

verifed

verified

The  search( method returns the position...

View Answer

What are the toString()and toLocaleString()methods used for, and what is the difference between them?

Correct Answer

verifed

verified

You can use the toString( and  toLocaleS...

View Answer

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


A) pop()
B) push()
C) shift()
D) unshift()

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

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


A) expression
B) character
C) pattern
D) metarule

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

The ____ method converts a text string to lowercase.


A) toMinCase()
B) lowerCase()
C) toLowerCase()
D) toUpperCase()

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

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


A) convertToString()
B) json()
C) parse()
D) stringify()

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

To convert a JSON string to a JavaScript object, you use the parse()method of the JSON object.

A) True
B) False

Correct Answer

verifed

verified

List and describe three metacharacters that you can use with JavaScript regular expressions.

Correct Answer

verifed

verified

The following table lists the ...

View Answer

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) local
B) static
C) global
D) dynamic

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Regular expression patterns in JavaScript must begin and end with backward slashes.

A) True
B) False

Correct Answer

verifed

verified

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


A) subpattern
B) substring
C) subrule
D) subset

E) A) and D)
F) All of the above

Correct Answer

verifed

verified

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


A) tail
B) metacharacter
C) metastring
D) anchor

E) C) and D)
F) A) and C)

Correct Answer

verifed

verified

The length property counts escape sequences such as \n as two characters.

A) True
B) False

Correct Answer

verifed

verified

The ____ method converts a text string to uppercase.


A) toUpperCase()
B) toMaxCase()
C) toHigherCase()
D) toTitleCase()

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

You can use a text string as a literal value or assign it to a variable.

A) True
B) False

Correct Answer

verifed

verified

Explain how to change the case of a variable's valueusing the toLowerCase() or toUpperCase()method.

Correct Answer

verifed

verified

To change the case of letters in a strin...

View Answer

The ____________________ method of the String class creates a new string with the first instance of a specified pattern replaced with the value of the text argument.

Correct Answer

verifed

verified

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


A) arrange()
B) order()
C) list()
D) sort()

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

All literal strings and string variables in JavaScript are represented by a(n)____________________ class, which contains methods for manipulating text strings.

Correct Answer

verifed

verified

Showing 21 - 40 of 41

Related Exams

Show Answer