Javascript
JavaScript Fundamentals -- Objects in JavaScript

Exercise 1

PRO

Here is the first exercise for this section:

// 1. Create a new object called person, with a firstName key and a lastName key
// Put your first and last name as values to those keys

// 2. Log the firstName key using dot notation

// 3. Log the lastName key using bracket notation

// 4. Freeze the object you created above

// 5. Try and change an attribute on the object. If you don't see the expected behavior, make the necessary fix so that the freeze method works.

You can fork this exercise on StackBlitz by clicking here.