JSFiddle - React, Tailwind, and code Playground

by João Vitor Scheuermann

JavaScript

let testeString = "Recife - REC";

function formatName (_str) {
		let str = _str;
    str = _str.replace(" - ", "(") + ")";    
    return str
}

console.log(formatName(testeString))