Object.assign() vs. object spread operator in javascript, highlighting their uses and scenarios for optimal application.