[amp_mcq option1=”Like” option2=”Pattern” option3=”Match” option4=”StringMatch” correct=”option3″]
The correct answer is: C. Match
The Match operator allows you to use pattern matching characters to determine whether one String is equal to another String.
The Like operator is used to compare a String to a regular expression.
The Pattern operator is used to create a regular expression.
The StringMatch function is used to check if a String matches a regular expression.
Here is an example of how to use the Match operator:
“`
let str1 = “Hello, world!”;
let str2 = “Hello, world!”;
if (str1.Match(str2)) {
console.log(“The strings match.”);
} else {
console.log(“The strings do not match.”);
}
“`
This code will print “The strings match.” to the console.