Create a custom function findMax that takes in a parameter named numbers, which is an array of numerical values. Inside the function, locate the highest number in the array and then return this value.
// Helpful tip: Ensure that the max function consistently returns an element within the array rather than just any number.
https://i.sstatic.net/WWmh4.jpg
An error message is being displayed:
Your output was '4'. This is not accurate as the maximum number should be 5.