Console.log question

Console.log question
0

#1

Hey, why does newArray not get console.logged here? I know the code that comes after it is not correct but shouldn’t those log queries run before code further down the doc? Thanks

// Add your code below this line
let newArray=[];
for (let i=0; i>watchList.length; i++){
if(watchList.Director==="Cristopher Nolan"){
  newArray.push(watchList[i].imdbRating);
  console.log(newArray);
}
var numbered=Number(newArray);
console.log(numbered);
}

var averagedRating=numbered.reduce((sum, current)=>(sum+current), 0);
var averageRating=averagedRating/numbered.length;
// Add your code above this line

console.log(averageRating);

#2

Condition evaluates false thus not executing code in it.


#3

Ahhhhhh, thank you!!