Files

32 lines
537 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Use export to Reuse a Code Block
---
# Use export to Reuse a Code Block
2018-10-12 15:37:13 -04:00
---
## Problem Explanation
2018-10-12 15:37:13 -04:00
We learned how to import stuff from another file. But there's a catch. You can only import files that are **exported** from that other file.
Your task here is to export `foo` and `bar`.
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
Just add export in front of them!
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-12 15:37:13 -04:00
```javascript
"use strict";
export const foo = "bar";
export const bar = "foo";
```
</details>