freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../es6/use--to-import-everything-f.../index.md

21 lines
696 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Use * to Import Everything from a File
---
## Use * to Import Everything from a File
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
If you want to import everything possible from a file, then you use the `import * as _ from` syntax, provided by ES6. That's exactly what you're tasked at doing in this challenge!
## Hint 1:
Fill in the blanks: `import * as objName from "file-name"`. You can be creative with your `objName`, but your file name should be `capitalize_strings`.
## Spoiler Alert - Solution Ahead!
## Solution:
```javascript
"use strict";
import * as str from "capitalize_strings";
```