Double each number in the Array
Given an array of numbers, return the array with all the numbers multiplied by 2.
Sample Code:
function timesTwo(arr) {
// Enter your logic here...
}
Examples:
Input: [1,2,3]
Output: [2,4,6]
Explanation: All the numbers have been multiplied by 2.
Input: [1,0,1,0]
Output: [2,0,2,0]
Explanation: All the numbers have been multiplied by 2.