![Three Ways to Find the Longest Word in a String in JavaScript | by Sonya Moisset | We've moved to freeCodeCamp.org/news | Medium Three Ways to Find the Longest Word in a String in JavaScript | by Sonya Moisset | We've moved to freeCodeCamp.org/news | Medium](https://miro.medium.com/v2/resize:fit:10368/1*k2RZZ3j1e-_r9Av7SgzFDw.jpeg)
Three Ways to Find the Longest Word in a String in JavaScript | by Sonya Moisset | We've moved to freeCodeCamp.org/news | Medium
![Keagan Goetsch on X: "Just conquered @FreeCodeCamp Bonfire: Find Longest Word in a String https://t.co/CevmRvFuwx #LearnToCode #JavaScript https://t.co/rs8IlCZuCg" / X Keagan Goetsch on X: "Just conquered @FreeCodeCamp Bonfire: Find Longest Word in a String https://t.co/CevmRvFuwx #LearnToCode #JavaScript https://t.co/rs8IlCZuCg" / X](https://pbs.twimg.com/media/CWb5G7-UAAQcmJo.png)
Keagan Goetsch on X: "Just conquered @FreeCodeCamp Bonfire: Find Longest Word in a String https://t.co/CevmRvFuwx #LearnToCode #JavaScript https://t.co/rs8IlCZuCg" / X
![Why does my code not work in "Find the longest word in a string"? - JavaScript - The freeCodeCamp Forum Why does my code not work in "Find the longest word in a string"? - JavaScript - The freeCodeCamp Forum](https://global.discourse-cdn.com/freecodecamp/optimized/4X/d/a/4/da4d6b65cc7f75895f02abcbe9feb62946b0a772_2_690x469.png)
Why does my code not work in "Find the longest word in a string"? - JavaScript - The freeCodeCamp Forum
![Why does my code not work in "Find the longest word in a string"? - JavaScript - The freeCodeCamp Forum Why does my code not work in "Find the longest word in a string"? - JavaScript - The freeCodeCamp Forum](https://global.discourse-cdn.com/freecodecamp/original/4X/d/a/4/da4d6b65cc7f75895f02abcbe9feb62946b0a772.png)