Created
September 18, 2015 14:20
-
-
Save ceaksan/9c76d21e8eab4febc46c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function findLongestWord(str) { | |
| var cumle = str.split(' '); | |
| var kacKelime = cumle.length; | |
| var final = 0; | |
| for(var i = 0; kacKelime > i; i++) if(final < cumle[i].length) final = cumle[i].length; | |
| return final; | |
| } | |
| findLongestWord('The quick brown fox jumped over the lazy dog'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment