--- id: 587d7b8c367417b2b2512b56 title: Use export to Reuse a Code Block challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/export\s+const\s+foo\s*=\s*"bar"/g), "foo is exported.");' - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/export\s+const\s+bar\s*=\s*"foo"/g), "bar is exported.");' ```
## Challenge Seed
```js "use strict"; const foo = "bar"; const bar = "foo"; ```
### Before Test
```js window.exports = function(){}; ```
## Solution
```js // solution required ```