Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
console.log(Pattern.matches(“\\d”, “1”));

What will be the output of the following JavaScript code?
console.log(Pattern.matches(“\\d”, “1”));
a) true
b) false
c) undefined
d) 1

Answer: a
Explanation: The above code tests for single occurrence of digit. //d returns true when there is any digits occurring one time.

Join The Discussion