freeCodeCamp Challenge Guide: Title Case a Sentence
@veronicarbulu wrote: Hi all, I’ve had such hard time solving this exercise. I finally did it after looking at this page, but it feels I have copied the answer even with minor tweaks. I’ve copied 2 of...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@rugano wrote: My approach on this challenge: function titleCase(str) { var arr = []; var upperCase; var lowerCase = str.toLowerCase(); var words = lowerCase.split(’ ');//array of lowerCase words...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@sudaama wrote: Hi there, here is my solution to the problem. Capitalizing the first character of each element of string array ‘str’ then ‘lowercasing’ the other characters in the remainder of each...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@ayugioh2003 wrote: Your result is ' Short And Stout' There is a space on the begin, so your submit failed Read full topic
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@B3nNy5 wrote: Someone could explain me what (L) means in the Advanced solution? Thank you Read full topic
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@pouccini wrote: Can anyone tell me why this code does not complete the challenge? I can’t seem to find the problem. It looks like it returns the right answer. var fullStr = “”; function...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@pouccini wrote: False alarm. I didn’t declare the variable fullStr inside the function. Read full topic
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@gingermostly wrote: Here’s my solution! function titleCase(str) { var words = str.toLowerCase().split(’ ‘); var upper = []; for (var i = 0; i < words.length; i++) {...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@TrevorLChaney wrote: Can anyone help me, I have no idea why this doesn’t pass all cases. function titleCase(str) { var arr = str.split(’ ‘); var newStr = ‘’; for (var i = 0; i < arr.length; i++){...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@JonathanTillman1114 wrote: Here is what I was able to come up with for my solution using splice. function titleCase(str) { var lowerCase = str.toLowerCase(); var wordArray = lowerCase.split(" "); var...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@sanchovia wrote: While my code for this challenge was a little dirty, I was able to finish it. However, although the output is correct, it does not move on to the next challenge. Anyone else have...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@JohannOrn wrote: Same here! I wrote the following code which seems to give all the desired outputs, yet I only get a checkmark for the first criteria but a red X for the other three. function...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@sanchovia wrote: Is there someone who would be able to verify why this is happening? Moderators perhaps? [spoiler]function titleCase(array) { var finalArray = ''; var lowerC =...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@shafakyildiz wrote: var i = 0; function titleCase(str) { var little = str.toLowerCase(); var words = str.split(" "); while (i<words.length){ words.replace(...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@Ryan-ED wrote: camperbot: Basic Code Solution: The “Basic” Code Solution doesn’t look basic at all. Am I the only one who found it super confusing? The Intermediate Code Solution was a bit easier to...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@RossSlane wrote: Here is what I came up with L function titleCase(str) { var arr1 = str.toLowerCase().split(" "); var arr11 = []; for (a = 0; a < arr1.length; a++) {...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@xavi5 wrote: My solution seems to be valid, why isn’t it working? var string=[]; function titleCase(str) { str=str.toLowerCase().split(' '); for(var a=0;a<=str.length-1;a++) {...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@Alaa261190 wrote: For me this worked out pretty easy! function titleCase(str) { var splitted = str.toLowerCase().split(" "); for (i=0; i<splitted.length; i++) {...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@mazzaroth808 wrote: MY SOLUTION titleCase(Str) { var oldArr = str.toLowerCase().split(' '); var newArr = []; for (var i in oldArr) { var newWord = oldArr[i][0].toUpperCase() + oldArr[i].slice(1);...
View ArticlefreeCodeCamp Challenge Guide: Title Case a Sentence
@xavi5 wrote: Solution: The online compiler thing does not like it when I place global variables for some reason? function titleCase(str) { var string=""; //<----buffer variable...
View Article