Write a function named getLongestString that receives an Array of strings as parameter and returns the longest one.
If the Array is empty, return an empty string.
If there are multiple strings of the same maximum length, return the first one.
arrayOfStrings
=Unlock all functions
The first 10 functions are free. Get lifetime access to all 100 with a one-time payment — no subscription.
Upgrade to Pro