Javascript Array Concat Methodby@smpnjn
451 reads

Javascript Array Concat Method

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

The `concat` method on arrays is used to take two arrays and concatenate them into one. It takes as many arrays as you like - so you can concate many arrays at once. The method creates a shallow copy of the array it's applied to, with the addition of any other arrays added to the end. Nested arrays are concatenated in the same order that the outer array is removed, meaning the outer elements are removed. The basic premise is that the arrays we used in `Concat` maintain the same reference in memory.
featured image - Javascript Array Concat Method
Johnny Simpson HackerNoon profile picture

@smpnjn

Johnny Simpson

Product, Engineering, Web


Receive Stories from @smpnjn

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!