nia850
nia850 nia850
  • 21-09-2020
  • Computers and Technology
contestada

Create the code that will find
the longest word of the given
string. You are not allowed to
use split() method

(python)

Respuesta :

johnsong14306
johnsong14306 johnsong14306
  • 21-09-2020

Answer:

function findLongestWord(str) {

 var longestWord = str.split(' ').sort(function(a, b) { return b.length - a.length; });

 return longestWord[0].length;

}

findLongestWord(InputHere);

Explanation:

Replace InputHere with the input

Answer Link

Otras preguntas

Doppler Effect acts on ___________ type of wave ● Review: Doppler Effect is the perceived change in ______ of a wave when the object emitting that wave is in __
HUH giving out brainiest
Children's understanding of print knowledge awareness are evident in their writing
John Proctor refuses to acknowledge the church and continues to criticize its practices because of_______. a longstanding disagreement with the Reverend Parris
ANYONE PLEASE HELP ME WITH MY MATH HOMEWORK BECAUSE I HAVE TO PASS THIS LATER I HOPE Y'ALL CAN HELP ME:(I'LL MARK BRAINLIEST FOR THOSE WHO CAN ANSWER IT CORRECT
URGENTTT!!!! Let (-4,-2) be a point on the graph of y=f(x). Under the transformation y=3f(x), the point (-4,-2) will be translated to what point ?
help me pls! mark the brainliest!
What is the product of the 2 solutions of the equation 4x - 21 = 0?
ill give brainliest to first correct answer The height of a building is proportional to the number of floors. The figure shows the height of a building with flo
convert 15/9 to a decimal round your answer to the nearest hundred.convert 15/9 to a decimal round your answer to the nearest hundred ​