I keep getting this message in the console when I try and run the below code: "undefined is not an object (evaluating 'this.courseAvailThisTerm')". The courseAvailThisTerm() function works properly because it works in other contexts. Any one have an idea why I keep getting this error message? I've tried changing the for loop version but that doesn't work either.
for(let quarter of degreePlan) {
foundationCourseSet.forEach(function(fc) {
if(this.courseAvailThisTerm(fc, quarter.term))
console.log("It was avail!");
});
}