Being a BAD camper-Functional Programming: Use the reduce Method to Analyze Data-BUG

before anyone accuses me of trying to be a smarta#$, note that i really didn’t do this on purpose, and it could have been avoided if I read the directions more carefully . I sat over this for a bit trying to figure out why the average wasn’t coming out to what the exercise required. So i messed around a bit. Only after the code passed realized it wanted the average of all the movies by a certain director, and I fixed it. however
this monstrosity did pass. even though it shouldn’t, because it doesnt do what the exercise requires… Just saying…

var averageRating;

var arr=[];
var rating ={ return arr.push(parseFloat(obj.imdbRating));
var averageRating= Math.floor((arr.reduce(function(a,b){
return a+b;

p.s. here is the link to the exercise:
the ask for help link wasnt working…

Nice find!

You could be a hero and create an issue here.