Coding challenge

if(speed <= checks.maxSpeed || speed >= checks.minSpeed){
      return true;
    }
      
    for (const mission in missionData){
    if(missionData[mission].length === checks.dataEntries.astro){
          console.log(checks.dataEntries.astro);
          return true;
      }
    } 
      return false;

I have separated both. But I am still having a problem

I think you should review this structure. The way that it is, the first “if” statement is assuming all conditions as true before checking the others parameters.

1 Like