What is the difference between Factory Functions and Classes?

Hey
So what is the difference between Factory Functions and Classes? Doesn’t a class do the same thing as a factory function?

“JavaScript is an object-based language based on prototypes, rather than being class-based. Because of this different basis, it can be less apparent how JavaScript allows you to create hierarchies of objects and to have inheritance of properties and their values.”
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Details_of_the_Object_Model

This is the article on MDN that covers the concept. I think they can explain it better than I can.