$
at the end of the regex.
```js
let theEnding = "This is a never ending story";
let storyRegex = /story$/;
storyRegex.test(theEnding);
// Returns true
let noEnding = "Sometimes a story will have to end";
storyRegex.test(noEnding);
// Returns false
```
$
) to match the string "caboose"
at the end of the string caboose
.
"caboose"
with the dollar sign $
anchor in your regex.
testString: assert(lastRegex.source == "caboose$");
- text: Your regex should not use any flags.
testString: assert(lastRegex.flags == "");
- text: You should match "caboose"
at the end of the string "The last car on a train is the caboose"
testString: assert(lastRegex.test("The last car on a train is the caboose"));
```