freeCodeCamp Challenge Guide: Use * to Import Everything from a File

Use * to Import Everything from a File


Problem Explanation

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!


Hints

Hint 1

Fill in the blanks: import * as objName from "file-name". Normally you can be creative with your objName, but in this challenge, it must be named stringFunctions and ther file name should be ./string_functions.js.


Solutions

Solution 1 (Click to Show/Hide)
import * as stringFunctions from "./string_functions.js";
// add code above this line

stringFunctions.uppercaseString("hello");
stringFunctions.lowercaseString("WORLD!");
4 Likes