FAQ: Intermediate JavaScript Modules - Import Named Imports

Add to the tagged names @factoradic and @zystvan.

3 Likes

I’ve submitted several bug reports myself. I’ve never had one replied to directly. I have seen bugs discussed on the forum, that have either gained the attention of or were specifically brought to the attention of a Codecademy team member, and then seen the bugs fixed with an accompanying reply to the forum announcing the fix.

I’m not sure that the ‘bug fixing team’ would consider the SCT for a particular lesson only accepting one of several possible solutions a bug per se’. They may consider it more of a user preference, and not get in any hurry to address it.

2 Likes

I agree with you that this isn’t a bug per se. I, personally, haven’t submitted such issues in bug reports - just battled with the SCT until I’ve done what it wants, and treated it as an additional “consolidation” exercise. :wink: :rofl: However, I have definitely noticed from the comments a high number of frustrated learners with this particular lesson on modules, and when so many people are obviously being tortured rather than supported, I think that definitely comes under the scope of “bug”… until there is an additional option of submitting an “issues” report.

I have always understood that the forums were more for discussion, rather than rants about the design of particular exercises. When the rants start to outweigh healthy discussion, then I would say there is definitely a need for some “adjustments” :wink: :smiley:

3 Likes

The moderators and super users have a sort of inside track that has produced results in a few cases recently. I’ll see if we can’t get the issues in this thread some attention.

2 Likes

Thanks, really appreciate the reponses! :smiley:

1 Like

Hey all, I’ll get this flagged up, sounds very confusing indeed! Should be sorted within a week or two. If you have any future bug reports (anyone but particularly @jon_morris) send them to me in the format:

  • Summary Heading
  • URL
  • Error
  • Steps to recreate
  • Any known workaround

And I will get them sorted ASAP

4 Likes

If it was done on purpose, wouldn’t you think a little disclaimer at the beginning of the modules lesson would be logical? Like if we were told to use old-school function declarations in the prompt we would at least have some idea what was expected of us.

2 Likes

I agree with you. I’m tending to believe that rather than an intentional attempt to keep us on our toes, or familiarize us with the different ways functions can be written, it’s more likely an oversight that hasn’t been corrected. I believe that it has already been brought to the attention of the Codecademy Engineering team, but I’ll double check, and report it myself if it hasn’t. It is a bit confusing.

1 Like

That would be lovely. I’ve tried reporting it myself but it seems like it hasn’t done much. It’s strange because sometimes I get away with arrow functions and it isn’t an issue, like in Modules #9 “Export Named Exports”, but other times, particularly with the .forEach() method, I fail the step and have to use “function” instead (Modules 8 & 10 come to mind).

1 Like

What is up with these exercises? Every convention taught in previous exercises (arrow syntax, interpolation) is suddenly not accepted anymore? I’ve just spend 5 minutes pondering over an exercise because I forgot a semi-colon.

If this is what Codecademy has to offer for €35/month then yeah, this is gonna be my final month on this platform.

3 Likes

Guess you get what you pay for

Is anybody else getting an error due to all the exports we did in the previous lesson on airplane.js?

SyntaxError: /home/ccuser/workspace/intermediate-javascript_modules-airplanes/airplane.js: ‘import’ and ‘export’ may only appear at the top level (31:2)
29 |
30 | export function meetsSpeedRangeRequirements(maxSpeed, minSpeed,requiredSpeedRange) {

31 | export let range=maxSpeed-minSpeed;

I’ve been reading the forums for javascript module and I also threw a bug report to report that these lessons don’t support use of a lot of ES6 functionality and interpolation. There are no replies and I’m actually shocked because I started learning ES6 and testing ways for it to work because of the first few lessons teaching ES6. It should state in the instructions if the lesson does not support ES6 functionality instead of having the user doing test cases to figure out that the lesson only supports ES5

1 Like

Hi alex I’m currently working through the Intermediate Javascripts Modules and have hit the infamous arrow function blocks. looked through the comments and found yours dated August 6. Just to say that the lessons still haven’t been amended to accept arrow functions or at the very least warn the students that they can’t use them.

If you need me to send any more information just say so.

Yours, Damian

2 Likes

Great thanks, will chase this up again.

1 Like

@factoradic and @zystvan

@alexcraig @mtf

over one year now and this is still broken. What gives?

2 Likes

This is by far the most ridiculous and unnecessarily convoluted lesson on here. VERY disappointed in the quality here, code academy.

You could have gotten your point across in a short walk, but turned it in to a sprint of pointless syntax. On top of that you’ve changed up the regular flow that you have presented in past workspaces with no warning or reason. I’m in awe at the heap of mess that qualified as a lesson here.

3 Likes

In missionControl.js, the forEach inside the functions take two parameters, function and element. If I’m not mistaken the element argument is there to iterate over the array’s key value pairs to get .name for example.

But I am confused about the use of the function argument, what is it for? Example of the code I am talking about:

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

Those are not two arguments. The entire function is the argument to Array.forEach().

Remember in the unit on HOFs we learned about functions that take other functions as their argument. This is known as the callback.

Array.forEach(callback)

The method is iterating over the array, and giving each value as the argument of the callback which function then operates on that value.

Aside

Arrays do not have key-value pairs, but values. We access values using their index. However, on a technical note, arrays are objects, but we don’t treat them that way. As an object, the keys would be the indices.

For our purposes we treat arrays as Array objects and use the methods inherited from its prototype, such as .forEach().

Array.forEach() is a special implementation of for (let x of object) to extract the values within the array. Just like for…of iterates the entire array, so too does forEach. The difference is that we can break a for loop, but cannot break forEach iteration.