Quotes help make search much faster. Example: "Practice Makes Perfect"
Saturday, May 13, 2017
FreeCodeCamp Spinal Tap Case Sample Solution
function spinalCase(str) {
var str2 = str.replace(/([a-z](?=[A-Z]))/g,'$1 ');
var newStr = str2.replace(/\s|\x5F/g,"-");
return newStr.toLowerCase();
}
No comments:
Post a Comment