Question: I need the solution in Javascript. Task 1 Write a function: function solution(A); that, given an array A consisting of N integers, returns the maximum

 I need the solution in Javascript. Task 1 Write a function:

I need the solution in Javascript.

Task 1 Write a function: function solution(A); that, given an array A consisting of N integers, returns the maximum among all integers which are multiples of 4. For example, given array A as follows: [-6, -91, 1011, -100, 84, -22, 0, 1, 473] the function should return 84. Assume that: Nis an integer within the range [1..1,000); each element of array A is an integer within the range [-10,000..10,000); there is at least one element in array A which satisfies the condition in the task statement. In your solution, focus on correctness. The performance of your solution will not be the focus of the assessment. Copyright 2009-2022 by Codility Limited. All Rights Reserved. Unauthorized copying, publication or disclosure prohibited

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!