age: 6,

type: “Husky”,

As you can see, we have created a name: value pair of age: 6 and type: ‘Husky’. Notice how the words name and age are not in quotations? This is how you define a name for the pair: you specify it outside of any quotations. This imposes a restriction in that you must not have any spaces in your name, so camelCase is advised for terms. After you specify the name you must enter a colon to assign it to a value. In this case we are assigning it a number of 6 to age, and the word ‘Husky’ to the name of type. For the number, just as when we define a number variable, we omit the quotations, and likewise for the string ‘Husky’, we must use quotations just like we did when declaring our string variable. In the above example, after we have finished with our name: pair, we must enter a comma, which specifies that we have more name: value pairs to create. You must add a comma to the end of every name: value pair you create except the very last one in your object.

Skipping to the last name: value pair of our object, we can see the following code: