Skip to content

Commit 5e5a6e0

Browse files
Completed Task
1 parent 91b1e59 commit 5e5a6e0

File tree

1 file changed

+3
-0
lines changed
  • Regular-Expressions/Match-a-Literal-String-with-Different-Possibilities

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let petString = "James has a pet cat.";
2+
let petRegex = /cat|dog|fish|bird/;
3+
let result = petRegex.test(petString);

0 commit comments

Comments
 (0)