JSFiddle - React, Tailwind, and code Playground

by thezillion

HTML

<script>
    function replacevowels() {
    var s = "aA eE ae vla vua",
        vla = new Array('a', 'e', 'i', 'o', 'u'),
        vua = new Array('A', 'E', 'I', 'O', 'U'),
        i, sr;
        for (i=0; i<vla.length; i++){
            sr = s.replace(new RegExp(vla[i],'g'), vua[i]);
        }
    alert(sr);
}

</script>
<span onclick='replacevowels()'>Hi!</span>