Programming › Re: ..... by Kodejuice(op): 10:16pm On Jul 20, 2015 |
PrinceRondo: you never download video i'm nt a novice , most of the videos related to javascript are beginners based, or are they any advanced ones u knw. |
Programming › ..... by Kodejuice(op): 9:36pm On Jul 20, 2015*. Modified: 1:43am On Jul 10, 2017 |
Blah Blah Blah :/ |
Programming › Pattern Chaser In Javascript: Coding Challenge by Kodejuice(op): 4:29pm On Jul 20, 2015*. Modified: 4:48pm On Jul 20, 2015 |
Using the JavaScript language, have the function PatternChaser(str) take str which will be a string and return the longest pattern within the string. A pattern for this challenge will be defined as: if at least 2 or more adjacent characters within the string repeat at least twice. So for example "aabecaa" contains the pattern aa, on the other hand "abbbaac" doesn't contain any pattern. Your program should return yes/no pattern/null . So if str were "aabejiabkfabed" the output should be yes abe. If str were "123224" the output should return no null. The string may either contain all characters (a through z only), integers, or both. But the parameter will always be a string type. The maximum length for the string being passed in will be 20 characters. If a string for example is "aa2bbbaacbbb" the pattern is "bbb" and not "aa". You must always return the longest pattern possible. example patternChaser("abcddeddb"  ; //=> "dd"
my try, having little erros sha functions patternChaser(str){ for (i = 0; i < str.lengh; i++) { var letter = str[i], list = []; if (letter == str[i + 1]) { //to 20 if (str[i + 1] == str[i + 2]) { list.push(str[i], str[i + 1], str[i + 2]); i = i + 2; } else { list.push(str[i], str[i + 1]); i = i + 1; } } } //... incomplete }
For the JavaScript ninjas only. |
Politics › Re: New Fun Game To Help GEJ Find His Way Home by Kodejuice: 11:43am On Jun 09, 2015 |
chai,level 3 hard die |
Programming › Re: Android App, "Swift Downloader" by Kodejuice(op): 4:58pm On Jun 08, 2015 |
Luedave: nice work man. can yu add me on whatsapp lets talk BBM: 55ae9b1a |
Programming › Re: Android App, "Swift Downloader" by Kodejuice(op): 4:58pm On Jun 08, 2015 |
Luedave: nice work man. can yu add me on whatsapp lets talk BBM: 55AE9B1A |
Programming › Re: Android App, "Swift Downloader" by Kodejuice(op): 4:56pm On Jun 08, 2015 |
thewebcraft: Wow really cool, please work on your ui, you can also add the background download plugin so it downloads even when the app is closed, I also developed a plugin that allows you use the default android downloader....you're awesome!! please can i have link to your phonegap plugin. |
Programming › Re: Android App, "Swift Downloader" by Kodejuice(op): 11:49am On Jun 07, 2015 |
RickRichards: Good job. Can you develop for ios? Sure, using phonegap i'll be able to build for IOS, but 4 now thats not on my mind. |
Programming › Android App, "Swift Downloader" by Kodejuice(op): 10:31am On Jun 07, 2015*. Modified: 7:31pm On Oct 14, 2015 |
*contents cleared*
|