Does concat mutate array?



Does concat mutate array?..

Answer / Jitendra Kumar Rajak

Yes, concat() method in JavaScript mutates the original array. It returns a new array that is the concatenation of the two arrays, but it also modifies the original array.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What is the minimum number of nodes in an avl tree of height h?

1 Answers  


What is the best sorting technique?

1 Answers  


Which interfaces are implemented by printerstatereasons?

1 Answers  


Why does hashset use hashmap?

1 Answers  


Can arraylist hold different types?

1 Answers  


What is time complexity of quick sort?

1 Answers  


Define in brief an array.

1 Answers  


Differentiate between collection and collections.

1 Answers  


Why is quicksort better than mergesort?

1 Answers  


When new data are to be inserted into a data structure?

1 Answers  


Explain binary searching, Fibonacci search.

1 Answers  


What do you mean by back edge?

1 Answers  


Categories