The object above has three properties, the strings
lastName, and the function
welcomeMessage. These properties belong to the object and can only be accessed using dot notation. As shown in the
console.log() statement, the properties are accessed one by one and printed to the console. This values inside the objects are not affected by the dot notation and cannot be changed from the outside.