GoConqr has a new look! Let us know what you think.

Module 29 of 35 · Text

#29

welligton costa

/ *

Métodos de array - .map ()

-------------------------

`numbersDoubled` deve ser uma matriz contendo todos os valores em` números` duplicados

Use o método .map () para transformar cada item na matriz

* /

 

 

function double(num) {

return num * 2;

}

var numbers = [1, 2, 3, 4];

var numbersDoubled; // complete this statement (use map and the double function)

/*

DO NOT EDIT BELOW THIS LINE

--------------------------- */

console.log(numbersDoubled);

 

/ *

RESULTADO ESPERADO

---------------

[2,4,6,8]

* /

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?