1// Object literals are defined using the following syntax rules:
2// A colon separates property name from value.
3// A comma separates each name-value pair from the next.
4// There should be no comma after the last name-value pair.
5
6// If any of the syntax rules are broken, such as a missing comma or colon or curly brace,
7// an error will be thrown.
8
9var myObject = {
10 sProp: 'some string value',
11 numProp: 2,
12 bProp: false
13};
14
1const person = {
2 name: 'Anthony',
3 age: 32,
4 city: 'Los Angeles',
5 occupation: 'Software Developer',
6 skills: ['React','JavaScript','HTML','CSS']
7}
8
9//Use Template Literal to also log a message to the console
10const message = `Hi, I'm ${person.name}. I am ${person.age} years old. I live in ${person.city}. I am a ${person.occupation}.`;
11console.log(message);