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(“[^abc]”, “aemngq”));

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

Answer: b
Explanation: “^” is used as a negation operator. The above code will print false as “a” is present in the string passed in the argument.

Join The Discussion