The purpose of a constructor is to create an object and set values if there are any object properties present . It’s a neat way to create an object because you do not need to explicitly state what to return as the constructor function, by default, returns the object that gets created within it.