using lodash assign method, can I do
_.assign(self, {
inputContext: createAddonInputContext(),
currentEmployee: _.first(self.inputContext.employeeList),
});
the currentEmployee
property value calculation depends on inputContext
being assigned already. My question is, will this always work, or it can break in some environments i.e. when currentEmployee
will be assigned first?
In other words, does the order in which properties appear in source object literal guarantee the same order when the value are being evaluated? I'm aware that when we do for...in iteration over javascript object, the order isn not certain. Hence my question.