Tell us what’s happening:
why none of these methods work to split on multiple different cases
split("-|_")
split("[.-]")
.split(/[,.]/)
Your code so far
function spinalCase(str) {
var test= str.split("xx").join("-").toLowerCase();
console.log(test);
return test;
}
spinalCase('This Is Spinal Tap');
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
.
Challenge: Spinal Tap Case
Link to the challenge: