Deck 8: Manipulating Data in Strings and Arrays

ملء الشاشة (f)
exit full mode
سؤال
Regular expression patterns in JavaScript must begin and end with backward slashes.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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
سؤال
The JavaScript String class includes the ____ method, which creates a new string by combining strings that are passed as arguments.

A) strcpy()
B) strcat()
C) strpst()
D) concat()
سؤال
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
سؤال
The ____ method converts a text string to uppercase.

A) toUpperCase()
B) toMaxCase()
C) toHigherCase()
D) toTitleCase()
سؤال
The length property counts escape sequences such as \n as two characters.
سؤال
The replace()method is case sensitive.
سؤال
The ____ method returns the position number in a string of the first instance of the first character in the pattern argument.

A) charAt( pattern )
B) indexOf( pattern )
C) slice( pattern )
D) search( pattern )
سؤال
You use ____ classes in regular expressions to treat multiple characters as a single item.

A) expression
B) character
C) pattern
D) metarule
سؤال
To manipulate arrays in your scripts, you use the methods and length property of the ____ class.

A) Array
B) String
C) Matrix
D) Vector
سؤال
To convert a JSON string to a JavaScript object, you use the parse()method of the JSON object.
سؤال
A pattern that matches the beginning or end of a line is called a(n)____.

A) tail
B) metacharacter
C) metastring
D) anchor
سؤال
To allow a string to contain an alternate set of substrings, you separate the strings in a regular expression pattern with the ____ metacharacter.

A) $
B) /
C) |
D) &
سؤال
Regular expression patterns consist of literal characters and ____.

A) metacharacters
B) metadata
C) metabytes
D) supercharacters
سؤال
The String class ____ property returns the number of characters in a string.

A) elements
B) size
C) length
D) maxIndex
سؤال
You can use a text string as a literal value or assign it to a variable.
سؤال
The ____ method of the String class returns the position number in a string of the first character in the argument.

A) search()
B) charAt()
C) indexOf()
D) substring()
سؤال
The ____ object contains methods and properties for working with regular expressions in JavaScript.

A) Expression
B) RegExp
C) StrExp
D) StringExp
سؤال
The ____ method constructs a text string from Unicode character codes that are passed as arguments.

A) fromCharCode()
B) fromUniCode()
C) fromLangCode()
D) fromStrCode()
سؤال
The ____ method converts a text string to lowercase.

A) toMinCase()
B) lowerCase()
C) toLowerCase()
D) toUpperCase()
سؤال
All literal strings and string variables in JavaScript are represented by a(n)____________________ class, which contains methods for manipulating text strings.
سؤال
Match between columns
Compares strings according to the particular sort order of a language or country
string
Compares strings according to the particular sort order of a language or country
parse()
Compares strings according to the particular sort order of a language or country
|
Compares strings according to the particular sort order of a language or country
Unicode
Compares strings according to the particular sort order of a language or country
pop()
Compares strings according to the particular sort order of a language or country
join()
Compares strings according to the particular sort order of a language or country
localeCompare()method
Compares strings according to the particular sort order of a language or country
metacharacter
Compares strings according to the particular sort order of a language or country
quantifier
Compares strings according to the particular sort order of a language or country
push()
Text contained within double or single quotation marks
string
Text contained within double or single quotation marks
parse()
Text contained within double or single quotation marks
|
Text contained within double or single quotation marks
Unicode
Text contained within double or single quotation marks
pop()
Text contained within double or single quotation marks
join()
Text contained within double or single quotation marks
localeCompare()method
Text contained within double or single quotation marks
metacharacter
Text contained within double or single quotation marks
quantifier
Text contained within double or single quotation marks
push()
A standardized set of characters from many of the world's languages
string
A standardized set of characters from many of the world's languages
parse()
A standardized set of characters from many of the world's languages
|
A standardized set of characters from many of the world's languages
Unicode
A standardized set of characters from many of the world's languages
pop()
A standardized set of characters from many of the world's languages
join()
A standardized set of characters from many of the world's languages
localeCompare()method
A standardized set of characters from many of the world's languages
metacharacter
A standardized set of characters from many of the world's languages
quantifier
A standardized set of characters from many of the world's languages
push()
Metacharacter that specifies the quantity of a match
string
Metacharacter that specifies the quantity of a match
parse()
Metacharacter that specifies the quantity of a match
|
Metacharacter that specifies the quantity of a match
Unicode
Metacharacter that specifies the quantity of a match
pop()
Metacharacter that specifies the quantity of a match
join()
Metacharacter that specifies the quantity of a match
localeCompare()method
Metacharacter that specifies the quantity of a match
metacharacter
Metacharacter that specifies the quantity of a match
quantifier
Metacharacter that specifies the quantity of a match
push()
Special character that defines pattern matching rules in a regular expression
string
Special character that defines pattern matching rules in a regular expression
parse()
Special character that defines pattern matching rules in a regular expression
|
Special character that defines pattern matching rules in a regular expression
Unicode
Special character that defines pattern matching rules in a regular expression
pop()
Special character that defines pattern matching rules in a regular expression
join()
Special character that defines pattern matching rules in a regular expression
localeCompare()method
Special character that defines pattern matching rules in a regular expression
metacharacter
Special character that defines pattern matching rules in a regular expression
quantifier
Special character that defines pattern matching rules in a regular expression
push()
Separates alternate sets of substrings in a regular expression
string
Separates alternate sets of substrings in a regular expression
parse()
Separates alternate sets of substrings in a regular expression
|
Separates alternate sets of substrings in a regular expression
Unicode
Separates alternate sets of substrings in a regular expression
pop()
Separates alternate sets of substrings in a regular expression
join()
Separates alternate sets of substrings in a regular expression
localeCompare()method
Separates alternate sets of substrings in a regular expression
metacharacter
Separates alternate sets of substrings in a regular expression
quantifier
Separates alternate sets of substrings in a regular expression
push()
Adds one or more elements to the end of an array
string
Adds one or more elements to the end of an array
parse()
Adds one or more elements to the end of an array
|
Adds one or more elements to the end of an array
Unicode
Adds one or more elements to the end of an array
pop()
Adds one or more elements to the end of an array
join()
Adds one or more elements to the end of an array
localeCompare()method
Adds one or more elements to the end of an array
metacharacter
Adds one or more elements to the end of an array
quantifier
Adds one or more elements to the end of an array
push()
Removes the last element from the end of an array
string
Removes the last element from the end of an array
parse()
Removes the last element from the end of an array
|
Removes the last element from the end of an array
Unicode
Removes the last element from the end of an array
pop()
Removes the last element from the end of an array
join()
Removes the last element from the end of an array
localeCompare()method
Removes the last element from the end of an array
metacharacter
Removes the last element from the end of an array
quantifier
Removes the last element from the end of an array
push()
Converts a JSON string value to an object
string
Converts a JSON string value to an object
parse()
Converts a JSON string value to an object
|
Converts a JSON string value to an object
Unicode
Converts a JSON string value to an object
pop()
Converts a JSON string value to an object
join()
Converts a JSON string value to an object
localeCompare()method
Converts a JSON string value to an object
metacharacter
Converts a JSON string value to an object
quantifier
Converts a JSON string value to an object
push()
Combines array elements into a string
string
Combines array elements into a string
parse()
Combines array elements into a string
|
Combines array elements into a string
Unicode
Combines array elements into a string
pop()
Combines array elements into a string
join()
Combines array elements into a string
localeCompare()method
Combines array elements into a string
metacharacter
Combines array elements into a string
quantifier
Combines array elements into a string
push()
سؤال
The ____ method adds one or more elements to the end of an array.

A) pop()
B) push()
C) shift()
D) unshift()
سؤال
To sort elements of an array alphabetically, you use the ____ method.

A) arrange()
B) order()
C) list()
D) sort()
سؤال
To convert a JavaScript object to a JSON string, you use the ____ method.

A) convertToString()
B)json()
C)parse()
D)stringify()
سؤال
List and describe three metacharacters that you can use with JavaScript regular expressions.
سؤال
What are the toString()and toLocaleString()methods used for, and what is the difference between them?
سؤال
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.
سؤال
When applied to text strings, the term ____________________ refers to the act of extracting characters or substrings from a larger string.
سؤال
The ____ method removes and returns the first element from the beginning of an array.

A) split()
B) unshift()
C) shift()
D) slice()
سؤال
You use the ____ method of the String class to split a string into an indexed array.

A) toArray()
B) slice()
C) split()
D) shift()
سؤال
Provide two different regular expressions that return true only when tested against a string consisting of exactly 5 characters.
سؤال
Explain how to change the case of a variable's valueusing the toLowerCase() or toUpperCase()method.
سؤال
Explain the difference between the shift()and unshift()methods of the Array object.
سؤال
_________________________ are patterns that are used for matching and manipulating strings according to specified rules.
سؤال
__________ is a data format that represents a JavaScript object as a string.
سؤال
What is the primary difference between the search()method and the indexOf()method?
سؤال
How can you combine text strings with JavaScript?
سؤال
How can you match any metacharacters as literal values in a regular expression?
سؤال
What is the difference between the slice()and substring()methods?
سؤال
How do you create a character class with JavaScript?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/41
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Manipulating Data in Strings and Arrays
1
Regular expression patterns in JavaScript must begin and end with backward slashes.
False
2
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
A
3
The JavaScript String class includes the ____ method, which creates a new string by combining strings that are passed as arguments.

A) strcpy()
B) strcat()
C) strpst()
D) concat()
D
4
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
5
The ____ method converts a text string to uppercase.

A) toUpperCase()
B) toMaxCase()
C) toHigherCase()
D) toTitleCase()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
6
The length property counts escape sequences such as \n as two characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
7
The replace()method is case sensitive.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
8
The ____ method returns the position number in a string of the first instance of the first character in the pattern argument.

A) charAt( pattern )
B) indexOf( pattern )
C) slice( pattern )
D) search( pattern )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
9
You use ____ classes in regular expressions to treat multiple characters as a single item.

A) expression
B) character
C) pattern
D) metarule
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
10
To manipulate arrays in your scripts, you use the methods and length property of the ____ class.

A) Array
B) String
C) Matrix
D) Vector
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
11
To convert a JSON string to a JavaScript object, you use the parse()method of the JSON object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
12
A pattern that matches the beginning or end of a line is called a(n)____.

A) tail
B) metacharacter
C) metastring
D) anchor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
13
To allow a string to contain an alternate set of substrings, you separate the strings in a regular expression pattern with the ____ metacharacter.

A) $
B) /
C) |
D) &
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
14
Regular expression patterns consist of literal characters and ____.

A) metacharacters
B) metadata
C) metabytes
D) supercharacters
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
15
The String class ____ property returns the number of characters in a string.

A) elements
B) size
C) length
D) maxIndex
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
16
You can use a text string as a literal value or assign it to a variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ____ method of the String class returns the position number in a string of the first character in the argument.

A) search()
B) charAt()
C) indexOf()
D) substring()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
18
The ____ object contains methods and properties for working with regular expressions in JavaScript.

A) Expression
B) RegExp
C) StrExp
D) StringExp
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
19
The ____ method constructs a text string from Unicode character codes that are passed as arguments.

A) fromCharCode()
B) fromUniCode()
C) fromLangCode()
D) fromStrCode()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
20
The ____ method converts a text string to lowercase.

A) toMinCase()
B) lowerCase()
C) toLowerCase()
D) toUpperCase()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
21
All literal strings and string variables in JavaScript are represented by a(n)____________________ class, which contains methods for manipulating text strings.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
22
Match between columns
Compares strings according to the particular sort order of a language or country
string
Compares strings according to the particular sort order of a language or country
parse()
Compares strings according to the particular sort order of a language or country
|
Compares strings according to the particular sort order of a language or country
Unicode
Compares strings according to the particular sort order of a language or country
pop()
Compares strings according to the particular sort order of a language or country
join()
Compares strings according to the particular sort order of a language or country
localeCompare()method
Compares strings according to the particular sort order of a language or country
metacharacter
Compares strings according to the particular sort order of a language or country
quantifier
Compares strings according to the particular sort order of a language or country
push()
Text contained within double or single quotation marks
string
Text contained within double or single quotation marks
parse()
Text contained within double or single quotation marks
|
Text contained within double or single quotation marks
Unicode
Text contained within double or single quotation marks
pop()
Text contained within double or single quotation marks
join()
Text contained within double or single quotation marks
localeCompare()method
Text contained within double or single quotation marks
metacharacter
Text contained within double or single quotation marks
quantifier
Text contained within double or single quotation marks
push()
A standardized set of characters from many of the world's languages
string
A standardized set of characters from many of the world's languages
parse()
A standardized set of characters from many of the world's languages
|
A standardized set of characters from many of the world's languages
Unicode
A standardized set of characters from many of the world's languages
pop()
A standardized set of characters from many of the world's languages
join()
A standardized set of characters from many of the world's languages
localeCompare()method
A standardized set of characters from many of the world's languages
metacharacter
A standardized set of characters from many of the world's languages
quantifier
A standardized set of characters from many of the world's languages
push()
Metacharacter that specifies the quantity of a match
string
Metacharacter that specifies the quantity of a match
parse()
Metacharacter that specifies the quantity of a match
|
Metacharacter that specifies the quantity of a match
Unicode
Metacharacter that specifies the quantity of a match
pop()
Metacharacter that specifies the quantity of a match
join()
Metacharacter that specifies the quantity of a match
localeCompare()method
Metacharacter that specifies the quantity of a match
metacharacter
Metacharacter that specifies the quantity of a match
quantifier
Metacharacter that specifies the quantity of a match
push()
Special character that defines pattern matching rules in a regular expression
string
Special character that defines pattern matching rules in a regular expression
parse()
Special character that defines pattern matching rules in a regular expression
|
Special character that defines pattern matching rules in a regular expression
Unicode
Special character that defines pattern matching rules in a regular expression
pop()
Special character that defines pattern matching rules in a regular expression
join()
Special character that defines pattern matching rules in a regular expression
localeCompare()method
Special character that defines pattern matching rules in a regular expression
metacharacter
Special character that defines pattern matching rules in a regular expression
quantifier
Special character that defines pattern matching rules in a regular expression
push()
Separates alternate sets of substrings in a regular expression
string
Separates alternate sets of substrings in a regular expression
parse()
Separates alternate sets of substrings in a regular expression
|
Separates alternate sets of substrings in a regular expression
Unicode
Separates alternate sets of substrings in a regular expression
pop()
Separates alternate sets of substrings in a regular expression
join()
Separates alternate sets of substrings in a regular expression
localeCompare()method
Separates alternate sets of substrings in a regular expression
metacharacter
Separates alternate sets of substrings in a regular expression
quantifier
Separates alternate sets of substrings in a regular expression
push()
Adds one or more elements to the end of an array
string
Adds one or more elements to the end of an array
parse()
Adds one or more elements to the end of an array
|
Adds one or more elements to the end of an array
Unicode
Adds one or more elements to the end of an array
pop()
Adds one or more elements to the end of an array
join()
Adds one or more elements to the end of an array
localeCompare()method
Adds one or more elements to the end of an array
metacharacter
Adds one or more elements to the end of an array
quantifier
Adds one or more elements to the end of an array
push()
Removes the last element from the end of an array
string
Removes the last element from the end of an array
parse()
Removes the last element from the end of an array
|
Removes the last element from the end of an array
Unicode
Removes the last element from the end of an array
pop()
Removes the last element from the end of an array
join()
Removes the last element from the end of an array
localeCompare()method
Removes the last element from the end of an array
metacharacter
Removes the last element from the end of an array
quantifier
Removes the last element from the end of an array
push()
Converts a JSON string value to an object
string
Converts a JSON string value to an object
parse()
Converts a JSON string value to an object
|
Converts a JSON string value to an object
Unicode
Converts a JSON string value to an object
pop()
Converts a JSON string value to an object
join()
Converts a JSON string value to an object
localeCompare()method
Converts a JSON string value to an object
metacharacter
Converts a JSON string value to an object
quantifier
Converts a JSON string value to an object
push()
Combines array elements into a string
string
Combines array elements into a string
parse()
Combines array elements into a string
|
Combines array elements into a string
Unicode
Combines array elements into a string
pop()
Combines array elements into a string
join()
Combines array elements into a string
localeCompare()method
Combines array elements into a string
metacharacter
Combines array elements into a string
quantifier
Combines array elements into a string
push()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
23
The ____ method adds one or more elements to the end of an array.

A) pop()
B) push()
C) shift()
D) unshift()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
24
To sort elements of an array alphabetically, you use the ____ method.

A) arrange()
B) order()
C) list()
D) sort()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
25
To convert a JavaScript object to a JSON string, you use the ____ method.

A) convertToString()
B)json()
C)parse()
D)stringify()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
26
List and describe three metacharacters that you can use with JavaScript regular expressions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
27
What are the toString()and toLocaleString()methods used for, and what is the difference between them?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
28
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
29
When applied to text strings, the term ____________________ refers to the act of extracting characters or substrings from a larger string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
30
The ____ method removes and returns the first element from the beginning of an array.

A) split()
B) unshift()
C) shift()
D) slice()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
31
You use the ____ method of the String class to split a string into an indexed array.

A) toArray()
B) slice()
C) split()
D) shift()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
32
Provide two different regular expressions that return true only when tested against a string consisting of exactly 5 characters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
33
Explain how to change the case of a variable's valueusing the toLowerCase() or toUpperCase()method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
34
Explain the difference between the shift()and unshift()methods of the Array object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
35
_________________________ are patterns that are used for matching and manipulating strings according to specified rules.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
36
__________ is a data format that represents a JavaScript object as a string.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
37
What is the primary difference between the search()method and the indexOf()method?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
38
How can you combine text strings with JavaScript?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
39
How can you match any metacharacters as literal values in a regular expression?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
40
What is the difference between the slice()and substring()methods?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
41
How do you create a character class with JavaScript?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 41 في هذه المجموعة.