HOW TO CREATE OBJECT AND ASSIGN THE VALUE IN OBJECT?

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
 1312  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    how to create object and assign the value in object?

    Create new object
    var obj =new Object();
    or
    obj={};

    Assign the value in object
    obj["name"]="amit";
    or
    obj.name="amit";

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!