is using the spread operator like this a normal practice in javascript?
const LocationDefinition = (def = {}) =>
({
Name: "",
PersonalName: "",
Parent: "",
Image: "",
Description: "",
Exits: [],
OnEnter: () => {},
...def
});
const RoomA = LocationDefinition(
{
Name: "Room A"
});
>t. c++ dev