Quantcast
Channel: freeCodeCamp Challenge Guide: Title Case a Sentence
Viewing latest article 13
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 latest article 13
Browse Latest Browse All 50

Trending Articles


Vimeo 10.7.1 by Vimeo.com, Inc.


UPDATE SC IDOL: TWO BECOME ONE


KASAMBAHAY BILL IN THE HOUSE


Girasoles para colorear


Presence Quotes – Positive Quotes


EASY COME, EASY GO


Love with Heart Breaking Quotes


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


FORTUITOUS EVENT


Pokemon para colorear


Sapos para colorear


Smile Quotes


Letting Go Quotes


Love Song lyrics that marks your Heart


RE: Mutton Pies (frankie241)


Hato lada ym dei namar ka jingpyrshah jong U JJM Nichols Roy (Bah Joy) ngin...


Long Distance Relationship Tagalog Love Quotes