JS Assignment 11: Intro to Objects
skudeva (12)

Hi everyone,

I am not sure what to do in ex:1 and specifically this line "This variable should be assigned a new object".

https://repl.it/student/submissions/6959613

You are viewing a single comment. View All
malvoliothegood (149)

@skudeva
Your code:

let aboutMe = [];
let about ={
    name:'Stef',
    city:'LA',
    favouriteAnimal:'Bunny',
};

The instructions say to assign aboutMe to the object. You have assigned about. You can leave out the comma after city: 'LA'. Also, the convention is to use more spaces in your syntax. Below is an example:

let studentA = {
    name: 'Mary White',
    class: 'Level 1 English',
    finalGrade: 'A+'
};
console.log("Student", studentA.name, "got a final grade of", studentA.finalGrade);