Question: 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](/questions/tagged/code-golf "show questions tagged 'code-golf'"), the shortest code in bytes wins.

Answer: 
[Swift](https://swift.org), 54 bytes
====================================

```swift
{($0 as[String]).reduce(""){$1.count>$0.count ?$1:$0}}

```

[Try it online!](https://tio.run/##Ky7PTCsx@V@WWKSQpmD7v1pDxUAhsTg6uKQoMy89VlOvKDWlNDlVQ0lJs1rFUC85vzSvxE7FAMJQsFcxtFIxqK39XwBUXaKRphGtBFRepKSjlJ9fAiRLEjNKlGI1Nf8DAA)
[Kotlin](https://kotlinlang.org), 21 bytes
==========================================

```
{it.maxBy{it.length}}

```

[Try it online!](https://tio.run/##y84vycnM@59Wmqfgk1lcYhNcUpSZl26nl5Ofl55aXKKhqWD7PzexwqmyOrNELyc1L70koxasOjcxMw8oW82lAAQFQE0lGmAmCOQATfJP01DKz0tV0lFQKinPB1F5@UqacCUIC8BCmly1/wE "Kotlin – Try It Online")