Please cheak this what is wrong here

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

const myConcat =(arr1, arr2) => arr1 + arr2
myConcat= arr1.concat(arr2);


console.log(myConcat([1, 2], [3, 4, 5]));
  **Your browser information:**

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

Challenge: Write Arrow Functions with Parameters

Link to the challenge:

The function isnt an ‘arrow function’ as you failed to wrap it in curly brackets {} plus the code isnt correct, try adding return instead of assigning it to a variable and remove the arr1 + arr2 because thats what the arr1.concat(arr2) is doing

If you need the solution=>

const myConcat = (arr1, arr2) => {

return arr1.concat(arr2);

};

console.log(myConcat([1, 2], [3, 4, 5]));

Good luck ! :slight_smile:

1 Like

Thank you for your great response

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.