Need to know which is the correct way of implementing the constructor function from these two options.
var Dog=function(name,bread)
{
    return {
        name:name,
        bread:bread
    }
}
function Dog(name,bread)
{
    var new_object= this;
    new_object.name=name;
    new_object.bread=bread;
}
 
     
     
    