Find longest word in a string function naming
See original GitHub issueFind the Longest Word in a String
Issue Description
The function name findLongestWord
is a little misleading as the challenge asks to return the length of the word not the word itself. How about findLongestWordLength
instead?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:10 (2 by maintainers)
Top Results From Across the Web
How to find the longest word within the string in JavaScript
Approach 2: By using the split() and sort() method. In this approach we split the string using the String.split() method and sort the...
Read more >How to find the longest word in a string - Educative.io
Line 1: We create a function. The name of the function is getLongestWord . It has argument named str which represents a string...
Read more >Three Ways to Find the Longest Word in a ... - freeCodeCamp
1. Find the Longest Word With a FOR Loop. For this solution, we will use the String.prototype.split() method · 2. Find the Longest...
Read more >JavaScript function: Find the longest word within a string
Write a JavaScript function that accepts a string as a parameter and find the longest word within the string. ... Explanation: Assume str...
Read more >Javascript: find longest word in a string - Stack Overflow
1 - Find the Longest Word With a FOR Loop function findLongestWord(str) { var strSplit = str.split(' '); var longestWord = 0; for(var...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No bug, it doesn’t affect the completion of the challenge. It’s purely for clarity. I was going to suggest fixing as I too am looking for something like this as I’ve never contributed before but if @usmandap has called first then I don’t mind.
@d33con Thanks bro and sure I will give it a try.