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: 
[PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), 24 bytes
===============================================================================

```powershell
($args[0]|sort l* -d)[0]

```

[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/X0MlsSi9ONogtqY4v6hEIUdLQTdFE8j9//@/g4ZSUmZ6empxiZKOglJJZl4liC7OTczJATHAckUgVk5@HkxVYk5xfk5eupImAA "PowerShell – Try It Online")

Takes input `$args[0]`, pipes that to `Sort-Object` based on `l`ength in `-d`escending order. Then takes the `[0]`th one thereof. Since sort is stable, this takes the first element in case of a tie.
[Vyxal](https://github.com/Vyxal/Vyxal), 2 bytes
================================================

```
ÞG

```

[Try it Online!](https://vyxal.pythonanywhere.com/#WyJBIiwiIiwiw55HIiwiIiwiW1widGlueVwiLFwiYmlnZ2VzdFwiXVxuW1wib25lXCIsXCJ0d29cIl1cbltcInR3b1wiLFwib25lXCJdIl0=)