Computer scienceProgramming languagesJavaScriptWorking with dataArrays

Array iterating

Double

Report a typo

The given function receives an integer array. Double every element and return the modified array.

Sample Input 1:

[ 1, 2, 3 ]

Sample Output 1:

[ 2, 4, 6 ]
Write a program in JavaScript
function doubleA(arr) {
//write your code here
}
___

Create a free account to access the full topic