remove letter until vowel javascript

Solutions on MaxInterview for remove letter until vowel javascript by the best coders in the world

showing results for - "remove letter until vowel javascript"
Lorenzo
18 Nov 2018
1const words = ['Art', 'Cheat', 'Cart', 'Jog', 'Fun', 'eat', 'Beat', 'meat', 'Run', 'Smart', 'cat', 'blog'];
2const regex = /^[^aeiou]+(?=[aeiou])/gi; // NOTICE THE i FLAG HERE
3
4for(i = 0; i < words.length; i++)
5  console.log(words[i] + ' > ' + words[i].replace(regex, ''));
6