Quantcast
Channel: freeCodeCamp Challenge Guide: Title Case a Sentence
Viewing all articles
Browse latest Browse all 50

freeCodeCamp Challenge Guide: Title Case a Sentence

$
0
0

Is there someone who would be able to verify why this is happening? Moderators perhaps?

[spoiler]function titleCase(array) {
  var finalArray = '';
  var lowerC = array.toLowerCase().split(' ');
  for(var i = 0; i < lowerC.length; i++) {
     var newArray = lowerC[i].replace(/[a-zA-Z]/, function(s) {return s.toUpperCase(); });
     finalArray += newArray + " "; 
  }  
  return ('"' + finalArray.slice(0, -1) + '"');
}[/spoiler]

I have also uploaded my function. Used the same .slice(0, -1). Works on Chrome Developer Tools. Why not here? Curious…

Read full topic


Viewing all articles
Browse latest Browse all 50

Trending Articles


UPDATE SC IDOL: TWO BECOME ONE


Tinkerbell para colorear, pintar e imprimir


Pokemon para colorear


Arbol genealogico para colorear


Sapos para colorear


Christmas Patama Quotes For Everyone


Re:Mutton Pies (jameskoiman)


Hagibis (1946) by Francisco V. Coching


Re: lwIP PIC32 port - new title : CycloneTCP a new open source stack for...


Vimeo 3.18.0 by Vimeo Inc