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
When you see comments like the ones to the right of the two lines, that means those are the only two lines you should be changing to solve the challenge.
let vowelRegex = /change/; // Change this line
let result = vowelRegex; // Change this line
You will need to create a regular expression in the first line and then use the regular expression with a string method shown in the examples.