Can the material in OOP course be done using class declaration?

I just finished the Object Oriented Programming course and now I’m wondering, everything that we did using prototype technique—could all of that been accomplished with class declarations? I did a different intro course and it taught using class and I’m wondering if the course here is using a pre-ES6 technique.

Not complaining at all, just trying to synthesize what I’m learning.

Link to the challenge:

Yes, class is just syntactic sugar for what’s being shown in the course, that’s how classes work in JS. You’re still using the exact same techniques if you use class, it’s just hidden behind the syntax.

Ah, yes, the syntactic sugar. Thanks!

Was this course written pre-ES6?

Would it be a good idea at the beginning of this course to explain that there is a completely different way of doing things? Not to explain that other way, but just so it plants the seed for the future if people see mention of class or so someone like me who learned the class technique first technique will know what’s going on?

If so, should the suggestion be made through a github issue?

1 Like

Yes, afaik it was created prior to class syntax. None of it is invalidated by that, because it’s the exact same thing, but yes making that slightly clearer might be helpful, just a sentence at the start possibly, so it’s worth opening an issue I think.

Do you know where I would do that? Looking at the issues section on github, they seem more like issues related to the coding of the site, not the wording of the instructions.

Or do I need to do a pull request on one of the md files here?

I’m not sure re changes to current curriculum – it’s just a case of opening an issue, but not sure how much it’s been frozen. I’m just going to move this thread to contributors rather than JavaScript though to see if more answers.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.