Properties


#1

`var Spencer = {
age: 22,
country: "United States"

var me = {
name: Daniel,
age: 17,
country:"United States"`

SyntaxError: Unexpected token var
@amanuel2 @albionsrefuge @ionatan


#2

You missing "}" after each variable and Daniel is not variable so make it string "Daniel".


#3

No, it is still saying SyntaxError: Unexpected token var


#4

Then can you format your whole code
1) copy and paste your code
2) highligt/select your whole code
3) then look for this </> and press it.
or
simply press ctrl + shift + c and past the code inside the highlighted area.


#5

`var Spencer = {
age: 22,
country: "United States"

var me = {
name: Daniel,
age: 17,
country:"United States"
}
}`


#6

Still not right format but look at your spencer variable it don't end with "}" and you have extra "}" at the end.


#7

`var Spencer = {
age: 22,
country: "United States"

var me = {
name: "Daniel",
age: 17,
country:"United States"
`
New Code and it still says SyntaxError: Unexpected token var


#8

you cod eshould look like this

 var Spencer = {
  age: 22,
  country: "United States"
}
var me = {
    name: "Daniel",
    age: 17,
    country:"United States"
}

#9

Here was the original code
var Spencer = {
age: 22,
country: "United States"


#10

missing "}" at the end of each variable.


#11

No, that is how the code was when i started the assignment and then i added my own version of the code using myself to complete the assignment
`var Spencer = {
age: 22,
country: "United States"
};

// make your own object here called me
`


#13

The actual syntax should be like this

var name = {
    name: "name"
    age: "age" 
    country: "country"
};

#14

When i do that it still says SyntaxError: Unexpected token var


#15

can you copy and paste the code above and see if it gives any error.


#16

I did that and i did give me the error
New Code
`var Spencer = {
age: 22,
country: "United States"

var name = {
name: "Daniel",
age: 17,
country: "United States"
};`


#17

replace name with "me".


#18

I did that and look at it
`var Spencer = {
age: 22,
country: "United States"

var me = {
name: "Daniel",
age: 17,
country: "United States"
};`
It still says SyntaxError: Unexpected token var


#19

The last thing you should do restart the browser or change into some other. if that doesn't solve the problem simply copy and paste this and try to understand where you made mistake.

var Spencer = {
age: 22,
country: "United States"
};
var me = {
name: "Daniel",
age: 17,
country: "United States"
};