Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

599 B

title
title
Using the Test Method

Using the Test Method


Problem Explanation

In this challenge, you are checking to see if a string contains a certain "regular expression", or regex (regular expressions). You will use the test() method to do that.


Hints

Hint 1

Call the test method on myRegex. What do you think the argument will be?


Solutions

Solution 1 (Click to Show/Hide)
let myString = "Hello, World!";
let myRegex = /Hello/;
let result = myRegex.test(myString); // Change this line