Which way is best for creating an object in javascript? is "var" necessary before variable of object?

So far I saw three ways for creating a object in JavaScript, which way is best for creating a object and why?

I also saw that in all of these examples the keyword "var" is not used before property, why? is it not necessary to declare "var" before the name of a property as it mentioned that Properties are variables.

I forgot to ask one more thing:

In way2 and way3 the name of object is in uppercase where is in way1 the name of object is in lower case... what case we should use for an object name?

Use way 1 if you want to create several similar objects. In your example, Person (you should start the name with a capital letter) is called the constructor function. This is similar to classes in other OO languages.

Use way 2 if you only need one object of a kind (like a singleton). If you want this object to inherit from another one, then you have to use a constructor function though.

Use way 3 if you want to initialize properties of the object depending on other properties of it or if you have dynamic property names.

Update: As requested examples for the third way.

Dependent properties:

The following does not work as this does not refer to book. There is no way to initialize a property with values of other properties in a object literal: