FAQ: Intermediate JavaScript Modules - Named Imports


This community-built FAQ covers the “Named Imports” exercise from the lesson “Intermediate JavaScript Modules”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Introduction To JavaScript

FAQs on the exercise Named Imports

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!


Did anyone try to use string interpolation instead of string concatenation to log ?

1 Like

Yes, I get the exact same output but the exercises in this section will not accept string interpolation as correct for any of them it seems.

1 Like

Me too. And I couldn’t pass the check using interpolation… until I modified the log message using concatenation.


Suppose I imported a function/object (named as AAA, for example) into my current .js file.
Can I create a different function/object, also named AAA, in the current .js file?

Does it cause an error? Or is it not considered the best practice even though we can do so?

I guess this may have something to do with how we should do function/object naming when writing code, right?


Can I import from files that are not .js ?


to the question, can I overwrite an imported function? I tried different things. Seems in Javascript changing a function is possible (unless you define it with const) but in this Codecademy exercise it is not. Try it out yourself!

1 Like