Getting the right results, not passing the tests on 100door

Tell us what’s happening:
Hi, I’m a bit confused why is this not passing the tests, not even for returning an array when I seem to be getting the right results when I checked it in console.

Your code so far

function getFinalOpenedDoors(numDoors) {

let allDoors=[];
let result=[];
for(i=0; i<numDoors; i++){
let iterator=1
for(let i=iterator-1;i<allDoors.length;i+=iterator){
} else{
for(let i=0;i<allDoors.length;i++){
return result


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Challenge: 100 doors

Link to the challenge:

What is the error message you are receiving? Sometimes you not only have to create the expected result but you also need to some in a certain way expected by the challenge.

Make sure all of your variables are declared before using them. I see one variable which was not declared. The FCC tests use “strict” mode, so all variables must be declared.

1 Like

That solved it! Thank you

We are currently working on getting the error to show in the console and the browser console (which currently is not showing), because currently the challenge silently fails. You are not the only person to have this problem.

1 Like