Array Properties & Methods part 2
Combining Arrays
JavaScript's concat() method allows you to join arrays and create an entirely new array.
Example:
The courses array that results contains 4 elements (HTML, CSS, JS, C++).
The concat operation does not affect the c1 and c2 arrays - it returns the resulting concatenation as a new array.
Comments
Post a Comment