var phoneFormatter = function(phoneNumber) {
var counter;
var current;
var phoneNumberLength = phoneNumber.length;
var digits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
var delimiter = "-";
if( typeof phoneNumber !== "string" || phoneNumberLength !== 8) return false;
for(counter = 0; counter < phoneNumberLength; counter++) {
current = phoneNumber[counter];
if(digits.indexOf(current) === -1) {
if (phoneNumber[3] === delimiter) {
return true;
} else if(current !== delimiter) {
return false;
}
}
}
return true;
}