Instead it changes everything in the string to dashes. Can someone explain why it is doing that? Here is the expression:
var replaceDots = function(str) {
return str.replace(/./g, '-');
}
I have been trying to figure this out for awhile now. I know it will work without being placed inside of the var replaceDots. It needs to be inside the variable to complete the question.