Observe the example and the explanation given in the challenge and you can figure it out yourself even without the knowledge of coding.
By checking the explanation, you see
Outside of a character set, the caret is used to search for patterns at the beginning of strings.
Okay, as long as caret is outside of whatever, it means search for patterns at the beginning of strings.
By looking at the example code,
let firstString = "Ricky is first and can be found.";
let firstRegex = /^Ricky/;
// Returns true
/^Ricky/ checks if a string begins with Ricky.
To use this pattern, you call
Now the string has changed and you must look for a different pattern
let firstString = "Cal and Ricky both like racing.";
let firstRegex = ___;// Fill in the blank
The previous example checked whether a string starts with Ricky with
/^Ricky/. Now, what should you do to check if the string starts with ‘Cal’?
This challenge assumes that you are already familiar with the concept of variable, calling function, and creating simple Regex pattern. If your understanding of them are fuzzy, you should review previous sections.