ES6 - Write Arrow Functions with Parameters

In completing this exercise, I’m getting a message that ‘The Function keyword should not be used’, and I am not using the function keyword, sooo… this appears to be a glitch. Resetting the code was not fruitful.
Your code so far

/*


doubler(4) would return the value 8.

If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted.

const doubler = item => item * 2;

It is possible to pass more than one argument into an arrow function.

const multiplier = (item, multi) => item * multi;
multiplier(4, 2);

multiplier(4, 2) would return the value 8.*/
const myConcat = (arr1, arr2) => arr1.concat(arr2);

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0

Challenge: ES6 - Write Arrow Functions with Parameters

Link to the challenge:

Try deleting the comment block

1 Like

It did the trick for me

That’s annoying (I’ve been doing that on literally every lesson for weeks so I can find the text of the lesson more easily). Thanks.

The comments really should be stripped.

I have an issue for it that was closed as fixed but that just fixed it for a specific challenge and not the root cause.

As far as I can tell, any challenge that is using getUserInput in the tests (which this one does) will not have the comments removed.

Test for challenge

https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters.md


Edit: PR