Code Golf · #5 · 2026-04-09
Find the maximum
Difficulty 1/3 · JavaScript
How to play
Write a JavaScript function body that passes all test cases using the fewest characters. Run against examples first, then submit for the full test suite. Eagle < Birdie < Par.
Given an array of numbers, return the largest one.
Examples
f([1,5,3]) → 5
f([-1,-5,-3]) → -1
Loading your progress...
Your code (function body — receives input)
function(input) { 0 chars
}
Write the shortest JavaScript function body that passes all tests · Back to hub