AI

The Spread operator (...) expands an array or object into individual elements. It's perfect for merging data.

Your Task:

  • Create combinedArray by merging arr1 and arr2 using spread
  • Create mergedObject by merging obj1 and obj2 using spread
  • arr1 should come before arr2
  • obj2 properties should overwrite obj1 if they share keys
TypeScript Solution
Loading...

Submit your code to see test results