Catuch The Voveles
JavaScript
var arrT = ('Helps protect your travel investment');
var final = arrT.toLowerCase().split("");
var vv = [];
var cc = [];
final.forEach(function(v) {
if ((/^[a-z]$/).test(v)) {
if ((/^[aeiou]$/).test(v)) {
vv++;
//vv.push(v);
} else {
cc++;
//cc.push(v);
}
}
})
console.log(`
The Number of Vovels is ${vv} and The Number of constants is ${cc}
`)