Does one have advantages over the other.
Don't assume everyone can see the subject when reading your message,
it's always good to ensure the body of a message stands alone without
the subject, so repeat or restate the subject in the body. Your
question (I think) is that given a choice of creating objects using a
literal or constructor, which has the most advantages?
There is no definitive answer to that, you can't define one as being
better or worse than the other in a general or sense or in absolute
terms. They have different features, each of which might be an
advantage, disadvantage or inconsequential depending on the the
requirements of a particular job.
I've read that object
literals are the preferred way of defining objects, but I'm not sure
if that is true, or why if it is.
A common use of an object literal is to define an object where only
one instance is required. Properties can be added, modified or removed
afterward and it has a short, simple [[prototype]] inheritance chain.
Constructors are useful for creating objects where more than one
"instance" is required or a more complex inheritance scheme is needed
than that provided by an object literal.
There are other ways of creating objects, none are mutually exclusive
and may be used in conjunction with each other. The method should be
chosen based on the specific requirements of the object being created
and how it should interact with other objects in the environment,
which in turn is defined by the application architecture or program
design.