// duplica o valor de entrada e retornaVocê pode passar mais de um argumento em funções de seta também.
const doubler = (item) => item * 2;
myConcat que anexa o conteúdo de arr2 a arr1 para que a função use a sintaxe da função de seta. 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.");'
```