question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Find longest word in a string function naming

See original GitHub issue

Find the Longest Word in a String

https://beta.freecodecamp.com/en/challenges/basic-algorithm-scripting/find-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:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
d33concommented, Jul 16, 2017

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.

0reactions
usmandapcommented, Jul 30, 2017

@d33con Thanks bro and sure I will give it a try.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found