Given an object with vacation details, return the same after adding a startDate
property, in the format of "Fri Dec 07 2018"
as per the year and day input passed to it.
- Only add
startDate
property if it's not present in the object.
- Try using Logical nullish assignment.
- Month should always be set as
December
.
For example: