11. MODULES | Lesson 8: "Named Imports"


#1

(Although others have had issues with this section and this lesson in particular, I can’t find a dedicated thread on it. Therefore I’ve added it to “Transpilation” because that was the preceding section. Here is the link: https://www.codecademy.com/courses/intermediate-javascript-modules/lessons/modules/exercises/named-imports?action=resume_content_item&course_redirect=introduction-to-javascript)

All of the code I entered passed steps 1 and 2, but upon entering the very straightforward requirement for step 3, the console returned an error in response to the earlier use of “.forEach” in step 2 and CC failed me. I am unsure how to proceed, and this feels like a bug.

See code here:

import { availableAirplanes, flightRequirements, meetsStaffRequirements } from './airplane';

function displayFuelCapacity() {
  availableAirplanes.forEach(function(element){
    console.log('Fuel Capacity of ' + element.name + ': ' + element.fuelCapacity);
  });
};

displayFuelCapacity();


function displayStaffStatus() {

}

and a screenshot of the instructions, hints, code, and resulting error here:

What do you think? Thanks!


#2

the availableAirplanes.js file is simple missing, feels like a bug indeed.

I will report the bug, to get past, copy all the code, reset and paste all the code in, press run, it does all the steps in a single go, and it works

or you can make a bug report yourself, if you wish


#3

Thank you, @stetim94 — that suggestion worked! I put in a report earlier as well.

All best


#4

good to hear :slight_smile:

thank you for making the bug report :slight_smile: