Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1.Extracting characters or substrings from a larger text string is known as ? a.

ID: 652744 • Letter: 1

Question

1.Extracting characters or substrings from a larger text string is known as ?

a.Parsing
b.compiling
c.rendering
d.stripping

2. What is the property of the Sting class that returns the number of characters in a string?

a.chars
b.size
c.width
d.length

3.Regular expressions patterns in Javascript must begin an end with what characters?

a.{}
b.//
c.()
d.[]

4.Which of the following is a method of the Regexp class of working with regular expressions?

a.search()
b.subexpression()
c.test()
d.class()

5.Which metacharacter in a regular expression represents any single character?

a. $
b. ^
c.
d. .

6.Which metacharacter(s) in a regular expression represent characters to exclude?

a. ()
b. []
c. [^]
d. -

7.A pattern that matches the begininng or end of a line is called a(n) (blank)?

a.anchor
b.root
c.metacharacter
d.class

8. To match any metacharacte as a literal value in a regular expression, you must (blank).

a.Enclose the character in brackets ([])
b.Enclose the character in paraentheses (())
c.precede the character with a slash (/)
d.precede the character with a backslash ()

9. Which of the following expression, would return false?

a. /^1./.test("1.10")
b. /^1./.test("1.10")
c. /1.$/test("1.10")
d. /1.$/.test("1.10")

10. Which of the following quantifiers specifies that the preceding character repeat at least 2 times?

a.{2}
b.{2,}
c.+
d.?

11.Which of the Following characters do you use to create a subexpression?

a. []
b. //
c. ()
d. {}

12.Which of the following expressions represent numeric Characters?

a.s
b.
c.d
d.D

13. Which method of the array class removes the last element from the end of an array?

a.pop()
b.push()
c.shift()
d.unshift()

14. What array would result from the following statement?

[white, silver, blue].splice(1, 0, "gray");

a. [gray, silver, blue]
b. [white, gray, blue]
c. [white, gray, silver, blue]
d. [gray,white, silver, blue]

15.The JSON.parse() method converts a value to which data type?

a. Object
b. String
c. Array
d. Number

16.After running statements

car media = "dvd", label = media.toUpperCase();

What is the value of the media variable and why?

17. What is the difference between the indexOf() and lastIndexOf() methods?

18.Explain why you would specifiy negative argument values for the slice() method.

19.Does the expression "a" < "A' evaluate to ture or false? Also Why?

20 What is the differece between the shift() an unshift() methods of the Array class?

Explanation / Answer

1.Extracting characters or substrings from a larger text string is known as ?

a.Parsing
b.compiling
c.rendering
d.stripping

Answer: