I'm pretty sure they wanted me to do this this way lmao

i’m pretty sure they wanted me to do this this way lmao

const myConcat = (arr1, arr2)=>[1,2,3,4,5];

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/85.0.4183.102 Safari/537.36.

Challenge: Write Arrow Functions with Parameters

Link to the challenge:

what happens if I call myConcat([2,9], [1,7,12])? it returns [1,2,3,4,5]

you should really try to use function parameters

This is how I went throw high school, then when I entered university I was panicking because I knew nothing.

1 Like

this code works because they only request myConcat() should return [1, 2, 3, 4, 5].
i made this post so they fix it

Hello there,

This issue was very recently discussed, and the lesson was changed slightly. You can read about it here:

The just of the discussion was (altered slightly):

The content of the function seems pretty irrelevant. We just need a test that checks if they turn the function into an arrow function with the two parameters.

At the end of the day, the lesson is focussed on teaching arrow functions. You have done just that. Therefore, your code is allowed to pass.

const myConcat = (arr1, arr2)=>[1,2,3,4,5];

Is this :arrow_up: a useful function…not really. So, the question is: Did you learn from the lesson how to create an arrow function?

1 Like