FAQ: Intermediate JavaScript Modules - Import Named Imports

This community-built FAQ covers the “Import 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 Import 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!

There seems to be an inconsistency in coding style in this section compared to the previous ones. While I was able to follow a specific coding style which I use in VS Code (including ES6 arrow functions), this doesn’t seem possible any more here. While the code does work fine, Codecademy’s questions “Did you…” are so cryptic in such cases that I had to ask for the solution several times, only to find out that a single SPACE in a function declaration was the culprit. Arrow functions seem to be forbidden as well.

6 Likes

In these exercises suddenly it’s not allowed to use arrow functions and template literals anymore to continue to next steps. It takes some time to find out it is now expected to write the code in another way, and then refactor the code.

It would be nice if someone would take a look and fix this.

3 Likes

Agree, the coding style is much more harsh in this lesson.

2 Likes

I believe they might be using Babel to actually use ES6 import/export. That could explain the completely differently coding style required here, although this wouldn’t really explain the missing arrow functions.

What’s more concerning is that apparently no-one of the Codecademy team is interested in responding to ANY of my various comments and bug reports.

3 Likes

I’m spending more time switching from arrow functions back to the oldschool function declarations that it needs than actually doing the lesson. very frustrating.

You can copy and past the hint to get past the requirements needs to continue than delete what you just wrote and go back to arrow functions and continue on. ridiculous but it works!

2 Likes

Hey Codecademy :wave:

There are a few users reporting this issue, could you take a look at this please as this is really frustrating while learning, initially the arrow function passes the step when writing it out, but when adding a statement, it then becomes not OK :man_shrugging:

It also seems that missing the ; on some lessons is OK, and others it’s not. Either way when checking the program it would be great if it was consistent.

@codecademy :pray:

2 Likes

Already have a year ago and codecademy still don’t care to reply :man_shrugging:

I also reported several bugs in the past, but never any reply. Maybe the reports go straight into the :wastebasket:

2 Likes

Arrow functions no longer qualify as a solution to the Javascript: Module exercises?

function displaySpeedRangeStatus() {
  availableAirplanes.forEach(element => {
    
  });
}

It seems that this unacceptable as opposed to:

function displaySpeedRangeStatus() {
  availableAirplanes.forEach(function(element) {
    
  });
}

I can’t tell if this is for particular reasons, such as not using ‘this’ when writing methods; or if another issue is present. This issue seems to be occasionally present throughout the web-dev path, sometimes function declarations are not allowed, other times it is arrow functions. Based on other posts I gather that this has been a problem for some time, did Codecademy put out any timelines on this problem?

1 Like

For this particular lesson the SCT is expecting this syntax:

availableAirplanes.forEach(function(element) {
//function body
});`

I agree it is frustrating that it won’t accept arrow function syntax for this step. The arrow syntax works. What I do when I run into one of these instances, is use the syntax the lesson will accept, and then after the step is passed, I go back and change it according to my preference. I think possibly they do this on purpose, so we get practice using different methods, and to help us recognize them when we see them in the future.

1 Like

@codecademy can you please look at these comments