Continuing with the argument names above, this would become:
```js
pattern = pattern.replace(
```

And you'd use `pattern` below instead of `val`.