Consider The Following Javascript Statements P Pre #34
Consider the following JavaScript statements. </p> <pre><code class="language-javascript"> var text = "testing: 1, 2, 3"; // Sample text var pattern = /\d+/g // Matches all instances of one or more digits </code></pre> <p>In order to check if the pattern matches with the string “text”, the statement is ____________
This multiple choice question (MCQ) is related to the book/course gs gs106 Javascript. It can also be found in gs gs106 Lexical Structures - JavaScript Expressions and Operators - Quiz No.1.
Consider the following JavaScript statements.
var text = "testing: 1, 2, 3"; // Sample text var pattern = /\d+/g // Matches all instances of one or more digits
In order to check if the pattern matches with the string “text”, the statement is ____________
text==pattern
text.equals(pattern)
text.test(pattern)
pattern.test(text)
Similar question(s) are as followings:
Online Quizzes of gs106 Javascript
Graphics and Rendering in JavaScript - Scripted Media - Quiz No.1
gs gs106 Javascript
Online Quizzes