Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Consider the following statement containing regular expressions

    var text = "testing: 1, 2, 3";

    var pattern = /d+/g;

    In order to check if the pattern matches, the statement is

  2. A.

     text==pattern

    B.

     text.equals(pattern)

    C.

     text.test(pattern)

    D.

     pattern.test(text)

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    The given pattern is applied on the text given in the paranthesis.


Be The First To Comment