Exam 8: Manipulating Data in Strings and Arrays

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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

(True/False)
4.9/5
(33)

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

(Multiple Choice)
4.8/5
(45)

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.

(Multiple Choice)
4.8/5
(30)

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.

(Short Answer)
4.9/5
(38)

The ____ method converts a text string to lowercase.

(Multiple Choice)
4.8/5
(43)

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

(Multiple Choice)
4.9/5
(32)

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

(Essay)
4.8/5
(33)

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

(Essay)
4.9/5
(36)

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

(True/False)
4.7/5
(39)

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

(Multiple Choice)
4.8/5
(30)

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

(True/False)
4.9/5
(34)

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

(Essay)
4.8/5
(35)

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

(True/False)
4.8/5
(40)

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

(Multiple Choice)
4.9/5
(37)

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

(Multiple Choice)
4.7/5
(44)

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

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

The ____ method converts a text string to uppercase.

(Multiple Choice)
4.8/5
(44)

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

(Multiple Choice)
4.7/5
(41)

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

(Short Answer)
4.9/5
(36)
Showing 21 - 40 of 41
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)