Can the spread operator be used to combine two arrays into one in ES6?

  • Yes
  • No
  • Only if the arrays are of the same length
  • Only if the arrays are of different types
Yes, the spread operator can be used to combine two arrays into one by spreading the elements of both arrays into a new array. It's a concise way of merging arrays without modifying the original arrays.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *