Created
April 16, 2014 05:57
-
-
Save rvbsanjose/10813687 to your computer and use it in GitHub Desktop.
This file contains 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
// Using the JavaScript language, have the function ThirdGreatest(strArr) take the array of strings stored in strArr and return // the third largest word within in. So for example: if strArr is ["hello", "world", "before", "all"] your output should be | |
// world because "before" is 6 letters long, and "hello" and "world" are both 5, but the output should be world because it | |
// appeared as the last 5 letter word in the array. If strArr was ["hello", "world", "after", "all"] the output should be after // because the first three words are all 5 letters long, so return the last one. The array will have at least three strings and // each string will only contain letters. | |
// Input = "coder","byte","code" Output = "code" | |
// Input = "abc","defg","z","hijk" Output = "abc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Y