Adding Properties
Adding Properties
Objects can gain new properties after they are created. This is useful when data starts small and later receives computed metadata.
Your task: Add a durationMinutes property to lesson from the provided duration. Then create lessonLabel containing the lesson title and duration, and log it.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Adding Properties
Objects can gain new properties after they are created. This is useful when data starts small and later receives computed metadata.
Your task: Add a durationMinutes property to lesson from the provided duration. Then create lessonLabel containing the lesson title and duration, and log it.