--- id: 587d7b88367417b2b2512b44 title: Write Arrow Functions with Parameters challengeType: 1 videoUrl: '' localeTitle: Escrever funções de seta com parâmetros --- ## Description
Assim como uma função normal, você pode passar argumentos para as funções de seta.
// duplica o valor de entrada e retorna
const doubler = (item) => item * 2;
Você pode passar mais de um argumento em funções de seta também.
## Instructions
Reescreva a função myConcat que anexa o conteúdo de arr2 a arr1 para que a função use a sintaxe da função de seta.
## Tests
```yml tests: - text: O usuário substituiu a palavra-chave var . testString: 'getUserInput => assert(!getUserInput("index").match(/var/g), "User did replace var keyword.");' - text: myConcat deve ser uma variável constante (usando const ). testString: 'getUserInput => assert(getUserInput("index").match(/const\s+myConcat/g), "myConcat should be a constant variable (by using const).");' - text: myConcat deve ser uma função testString: 'assert(typeof myConcat === "function", "myConcat should be a function");' - text: myConcat() retorna o array correto testString: 'assert(() => { const a = myConcat([1], [2]); return a[0] == 1 && a[1] == 2; }, "myConcat() returns the correct array");' - text: palavra-chave de function não foi usada. testString: 'getUserInput => assert(!getUserInput("index").match(/function/g), "function keyword was not used.");' ```
## Challenge Seed
```js var myConcat = function(arr1, arr2) { "use strict"; return arr1.concat(arr2); }; // test your code console.log(myConcat([1, 2], [3, 4, 5])); ```
## Solution
```js // solution required ```