Q.

Consider the following statements var text = "testing: 1, 2, 3"; // Sample text var pattern = /\d+/g In order to check if the pattern matches with the string “text”, the statement is

A. text==pattern
B. pattern.test(text)
C. text.test(pattern)
D. text.equals(pattern)
Answer» B. pattern.test(text)
2.6k
0
Do you find this helpful?
18

View all MCQs in

Web Technology

Discussion

No comments yet