Property Descriptors in JavaScript

Medium
3
50.0% Acceptance

In this lab, you will learn about property descriptors in JavaScript by creating an object that utilizes getter and setter property descriptors. To achieve this, you will create a getter property descriptor that computes and outputs the full name of a person and a setter property descriptor that initializes the age property of the person. Additionally, you will make the age property non-enumerable to improve data handling.

Finally, you will create and export a function named 'defineProperties()' which takes an object as an argument and adds the property descriptors fullName and age to the passed object, enhancing its functionality.