Codes for Assignment Creating a new object


Hi, can anybody help me about these codes? Not sure if I did it wrong. Thanks!
var me=new Object(){"Beichen";


What you have here is a combined constructor and literal which is invalid. Use one of either constructor notation (dot) or literal notation (object literal), but not both.

var me = new Object(); = "Beichen";
me.age = 24;


 var me = {
    name: "Beichen",
    age: 24

Note the subtle differences in syntax.


please someone help me out here
my code is :
var me = new object(); = "Amir";
me.age = 25;

i dont know exactly what is wrong with that !


When we use the new operator it is to invoke a new instance of a class. By convention, classes always start with a capital letter. This will come up shortly. For now though, just remember that Object is a class, so gets the capital.

var me = new Object();