ES6 - Write Arrow Functions with Parameters

Greeting everyone!
I am having difficulties passing this challenge, I keep on getting " The function keyword
should not be used" though it not present in my code , I even tried solutions in the forum
but non of them work. please help!

   **Your code so far**
const myConcat = (arr1, arr2) => arr1.concat(arr2);
// return arr1.concat(arr2);
console.log(myConcat([1, 2], [3, 4, 5]));

// Don't mind the code below

/* passing one parameters on an arrow  functiion
const addThree = (num) => num + 3;
//passing two parameters on arrow function
 const divider = (num1, num2) => num1 / num2;
 //three parameters
 const peformMath = (num1, num2, num3) => num1 / num2 * num3;
 console.log(peformMath(7, 3, 1.5));*/

   **Your browser information:**

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

Challenge: ES6 - Write Arrow Functions with Parameters

Link to the challenge:

I think it is just doing a text search for the word “function”. Since you have that word in your comment, it is getting flagged. If I remove those comments, the code passes.

1 Like

Thank you
You are right that was the issue, test passed. Thanks again!

1 Like

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