Array to even

Medium
8
7.5% Acceptance
  1. Create a function even(array, length of array). This function will take two arguments: a dynamic uint type array and the length of the array.
  2. The even() function will multiply each element of the array by 2.

Example:

  • If array = [2, 5, 11, 1], then even() should return [4, 10, 22, 2].
  • If array = [1, 3, 5, 7], then even() should return [2, 6, 10, 14].

NOTE: The function should be public.