-
Consider the following statements.
var t= "Example: 4, 5, 6"; // text
var p = /\d+/g // Matches all instances of one or more digits
In order to check if the pattern matches with the string “t”, the statement is
-
- p.test(t)
- t.test(p)
- t.equals(p)
- t==p
- None of these
Correct Option: A
The given pattern is applied on the text given in the parenthesis.