Your challenge is to take an array of strings and output the longest string in the array. So for
["tiny", "small", "bigger", "biggest"]
the output would be biggest
.
If two elements of the array have the same length, you should choose the one that appears first in the array. That means if the array looks like this:
["one", "two", "no"]
the output is one
, but if the array looked like this:
["two", "one", "no"]
the output is two
.
As this is code-golf, the shortest code in bytes wins.
1
It's heavily discouraged if the question is changed and invalidates existing answer, and2
the Sandbox exists for exactly that reason (make sure challenges are good before posting) \$\endgroup\$