I need help on ES6: Use * to Import Everything from a File

Tell us what’s happening:
i am stuck

Your code so far
import * as uppercaseString and lowercaseString from ‘./string_functions.js’;
// add code above this line

uppercaseString(“hello”);
lowercaseString(“WORLD!”);


import * as uppercaseString and lowercaseString  from './string_functions.js';
// add code above this line

uppercaseString("hello");
lowercaseString("WORLD!");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.60.

Challenge: Use * to Import Everything from a File

Link to the challenge:

This is not how you import everything unfortunately. You cannot use and to say that you want to import more than one thing.

When using * you have to do it like this:

import * as name from "module-name";

Also you shouldn’t have changed the code in the challenge. In your code there is no stringFunctions object:

// Only change code above this line

stringFunctions.uppercaseString("hello");
stringFunctions.lowercaseString("WORLD!");
1 Like

thanks i did not know about that