JSFiddle - React, Tailwind, and code Playground

by mark47

HTML

<script src="http://d3js.org/d3.v3.min.js"></script>
<div id="one">This is a sentence!</div>

CSS

.div {
   }

JavaScript

/*var vowels = ['a','e','i','o','u'];
function disemvowel(targetSentence) {
    var origStr = $(targetSentence).text();
    var newStr = "";
    $.each(vowels, function(index, value) {
        newStr = origStr.replace(new RegExp(value,"g"),'');
        origStr = newStr;
    });
    return newStr;
}
var newStr = disemvowel('#one');
$('div').html(newStr);*/

// A much better approach
var getText = $("#one").html();
var s = getText.replace(/[aeiou]/g, '');
$("#one").html(s);