function spinalCase(str) {
str = str.replace(/([a-z])([A-Z])/g, "$1 $2");
return str.split(/\s+|_+/).join("-").toLowerCase();
}
I need help with what "$1 $2"
means in the second line of the code above. That line of code was from the challenge guide.
Link to the challenge:
Link to the challenge guide