Open zivenday opened 5 years ago
function transformString(str) { return str.replace(/([a-z])|([A-Z])/g, function(match, low, up) { if (low) { return low.toUpperCase() } else { return up.toLowerCase() } }) } console.log(transformString('-mdez-Aaaa-'))