--- id: 5d661bc6e0696bdec46938d9 title: Part 27 challengeType: 0 dashedName: part-27 --- # --description-- There is repetition in the `goTown` and `goStore` functions. When you have repetition in code, it is a sign that you need a new function. Above the `goTown` function, create an empty function called `update`. This time the function should take a parameter named `location` so data can be passed into the function when it is called. Here is an example of a function named `testFun` that accepts a parameter named `param`: ```js function testFun(param) { console.log(param); } ``` # --hints-- See description above for instructions. ```js assert(update.toString().match(/function update\(\s*location\)\s*\{\s*\}/)); ``` # --seed-- ## --before-user-code-- ```html