A quick and efficient method to combine two or more arrays and still maintain the individual elements in the finished array.
Using unshift( ) or push( ) will add the whole array as a single element in the new array. If we wanted to add the elements individually then we would either have to use a loop and call push repeatedly OR we can use the concat( ) method and complete the same work with a single line of code.
The added benefit is that we can chain other Array methods at the end.
Code GIST: https://gist.github.com/prof3ssorSt3v...
On this page of the site you can watch the video online JavaScript Array concat method with a duration of hours minute second in good quality, which was uploaded by the user Steve Griffith - Prof3ssorSt3v3 22 July 2017, share the link with friends and acquaintances, this video has already been watched 12,427 times on youtube and it was liked by 197 viewers. Enjoy your viewing!