Add Elements to the End of an Array Using concat Instead of push

Add Elements to the End of an Array Using concat Instead of push
0

#1

Tell us what’s happening:

Can you help me.What is going wrong here?

Your code so far


function nonMutatingPush(original, newItem) {
  // Add your code below this line
 return original.concat;
  
  // Add your code above this line
}
var first = [1, 2, 3];
var second = [4, 5];
nonMutatingPush(first, second);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push


#2

concat is function, so needs parentheses() after concat and then in parentheses you need to add the newItem.
Hope it helps.


#3

In the original code, you should have simply changed the word push by the word concat


#4

Oh my god this was very simple thank youagain