My code keeps repeating math is not defined. how do i pass this please?

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function findLongestWordLength(s) {
return s.split('').reduce(function(longest,word){
  return math.max (longest,word.length)
}, 0);

findLongestWordLength("The quick brown fox jumped over the lazy dog");
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36

Challenge: Find the Longest Word in a String

Link to the challenge:

math is not defined

maybe you wanted Math?

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.