---
id: 62a3c91a2bab1b4d6fabb726
title: Step 40
challengeType: 0
dashedName: step-40
---
# --description--
Now create a `goCave` function that prints `Going to cave.` to the console.
# --hints--
You should use the `function` keyword to declare `goCave`.
```js
assert.match(code, /function goCave/);
```
`goCave` should be a function.
```js
assert.isFunction(goCave);
```
You should have a `console.log("Going to cave.");` line in your code.
```js
assert.match(code, /console.log\(('|")Going to cave\.\1\)/);
```
Your `console.log("Going to cave.");` line should be inside your `goCave` function.
```js
assert.match(goCave.toString(), /console.log\(('|")Going to cave\.\1\)/);
```
# --seed--
## --seed-contents--
```html
RPG - Dragon Repeller
XP: 0Health: 100Gold: 50
Monster Name: Health:
Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above.