Regular expression, Matching all single characters ,vowels
My program is giving the right result .But freecodecamp is throwing error
this is my pgm
let quoteSample = “Beware of bugs in the above code; I have only proved it correct, not tried it.”;
var vcount=0;
let vowelRegex = /[aeiou]/i; // Change this line
for (var i=0;i<quoteSample.length;i++)
{
let result = quoteSample[i].match(vowelRegex); // Change this line
console.log(result);
if(quoteSample[i].match(vowelRegex))vcount++;
}
console.log(vcount);