Java>Arrays and Obj Construct/Linear


Literally, what is wrong. Do I have to log the different names? Use ".name"? Make them strings? What in the actual..


var object1 = ...


We asked to create three objects,

var object1 = ... etc
var object2 = ... etc
var object3 = ... etc.

Edit: took too long to type; leaving it anyway.


Now do I use these to declare the objects and then do the syntax afterwards?


I don't think that's how you create an object. Look closer at those examples.


I know I'm missing the point..I grasp that..I just don't understand WHAT to make object 1, 2, etc...


What needs to be an object is what I'm confused on...I've tried several combinations.


Here are some examples:

var object1 = new Object(); = "Joann";
object1.age = 45;

var object2 = {}; = "Tampa";
object2.year = 2015;

var object3 = {
    dressing: "Ranch",
    quantity: 40

Note the literal syntax in the last one.


You should create a variable named object 1

like this:

var object1 = 5

Although that's not the right value. You should assign an object to that name.

And then there are two more names I believe?


Ahhhhhh I see you have to make the variable the "object*1*,2" . Ok..I get it now. Thank you so much!


not myObj....that makes more sense now