** BLOCKED - PLEASE HELP ** BUG IN TEST METHOD - Learn JavaScript: Modules


#1

Exercise: import

Step: 6. Call the displayFuelCapacity function

Result: error thrown with message ‘Did you call the displayAirplane() function?’

Error log:

/home/ccuser/workspace/intermediate-javascript_modules-airplanes/missionControl.js:12
console.log('Fuel Capacity of ’ + element.name + ': ’ + element.fuelCapacity);
^

ReferenceError: element is not defined
at displayFuelCapacity (missionControl.js:6:37)
at Object. (missionControl.js:9:1)
at Module._compile (module.js:571:32)
at loader (/home/ccuser/node_modules/babel-register/lib/node.js:158:5)
at Object.require.extensions.(anonymous function) [as .js] (/home/ccuser/node_modules/babel-register/lib/node.js:168:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Function.Module.runMain (module.js:605:10)
at /home/ccuser/node_modules/babel-cli/lib/_babel-node.js:171:48

Screencapture:


#2

That’s a bug in your code, you’re using a variable that doesn’t exist in that scope. Maybe you meant to use a different variable, or maybe you meant to do that somewhere else where such a variable does exist


#3

UPDATE: now unblocked

I clicked on the ‘Get Code’ button when it was available. Then, the ‘Next’ button resolved and I could advance to the next exercise.

However, the errant error message was still displaying even though the correct code was populated in the editor…


#4

It isn’t correct


#5

Doesn’t matter; I was able to click ‘Next’ & complete the course. Problem solved from my end!


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.