Objects
Object Literals
Object Literals
An object literal groups related values under property names. The object becomes one value you can pass around, while each property keeps its own meaning.
Property names should describe the role of the data. In application code, this is how a loose set of variables becomes a profile, setting, request, or record.
Your task: Create an object named account with name, plan, and active properties from the existing variables. Then create accountLabel by reading account.name and account.plan, and log the label.
Prerequisites
- variables
- strings
Tests
- account is a plain object
- account stores values from the existing variables
- accountLabel is built from account properties
- the account label is logged