JSFiddle - React, Tailwind, and code Playground
JavaScript
str = "ŐŰőű";
str = str
.replace(/Ő/g,'ö')
.replace(/Ű/g,'Ü')
.replace(/ő/g,'ö')
.replace(/ű/g,'ü')
alert(str);
str = "ŐŰőű";
str = str
.replace(/Ő/g,'ö')
.replace(/Ű/g,'Ü')
.replace(/ő/g,'ö')
.replace(/ű/g,'ü')
alert(str);