Whenever I attempt to run the code below, I consistently receive this console message: "undefined is not an object (evaluating 'this.courseAvailThisTerm')". Even though the courseAvailThisTerm() function functions properly in other scenarios. Any ideas on why this error persists? I've attempted altering the version of the for loop, but that hasn't resolved the issue.
for(let quarter of degreePlan) {
foundationCourseSet.forEach(function(fc) {
if(this.courseAvailThisTerm(fc, quarter.term))
console.log("It was avail!");
});
}