Skip to content

Instantly share code, notes, and snippets.

@thawkin3
Created August 24, 2022 18:07
Show Gist options
  • Select an option

  • Save thawkin3/996efb1219436c65ebea10791fefcb9c to your computer and use it in GitHub Desktop.

Select an option

Save thawkin3/996efb1219436c65ebea10791fefcb9c to your computer and use it in GitHub Desktop.
export const maxNumberArray = (numbers) => {
let max = numbers[0];
for (let i = 1; i < numbers.length; i++) {
if (numbers[i] > max) {
max = numbers[i];
}
}
return max;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment