Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Need help with a codingbat-type problem [closed]

$
0
0

(dealing with arrays, and I can't use any string splitting)

Assignment:

Return the length of the String with the longest length in the array.

Examples of proper return from code:

findLongest(["Hi", "there", "how", "little", "zoo"]) → 6findLongest(["AAA", "BBBB", "CCCCC", "DDD", "E"]) → 5findLongest(["HI"]) → 2

I can't figure out how to format the for loops or if statement.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>