My code appears to be correct, but when I run it I get Uncaught SyntaxError: Unexpected token , This is my code below:
function Classes(subject, class, scheduled) {
this.subject = subject;
this.class = class;
this.scheduled = scheduled;
this.checkAvailablility = function() {
return this.class - this.scheduled;
};
}
var CourseHistory = new Classes('history', 30, 23);
var CourseScience = new Classes('science', 45, 38);