1 | We can use constructors described later but simplest way is: |
2 | newobject ={}; |
3 | newobject.car = "honda"; |
4 | newobject.wheels = 4; |
5 | newobject.color = "red"; |
6 | Or newobject={car:"honda",wheels:4,color:"red"}; |
7 | Or newobject = new Array(); |
8 | newobject["car"] = "honda"; // etc. |
9 | This allows an "associative array" |