Difference between Literal and Constructor notation


#1

Hi everyone,

Could somebody please explain to me the difference between Literal and Constructor notation? I keep getting confused.

Thanks.


#2

var objectLiteral = { //Contained in Curly braces
property1: "Key value", //Properties Assigned with a colon
property2: "Key value",
};

//-----------------

var objectConstructor = new Object; //Declared as empty object
objectConstuctor.property1 = "Key Value"; //Properties assigned via "Dot-Notation"

#3

Thank you for your help!