Javascript – Is there a downside to calling new Date() multiple times
I have a factory that creates a new entity and it calls new Date() multiple times to fill multiple fields like shown below: dateJoined: format('yyyy-MM-dd')(new Date()), createdAt: new Date().toISOString(), updatedAt: new Date().toISOString() one of my senior engineers suggested saving new…