Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

628 B

title
title
Combine Two Arrays Using the concat Method

Combine Two Arrays Using the concat Method


Hints

Hint 1

  • The concat method is used to join two or more arrays or strings.

Hint 2

  • This method does not mutate the existing arrays, but returns a new array.

Solutions

Solution 1 (Click to Show/Hide)
function nonMutatingConcat(original, attach) {
  // Add your code below this line

  return original.concat(attach);

  // Add your code above this line
}
var first = [1, 2, 3];
var second = [4, 5];
nonMutatingConcat(first, second);