Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find vowel & consonants in a string java script

const str = "The quick brown fox jumps over a lazy dog"; 
const vowels = str.match(/[aeiou]/gi); 
const consonants = str.match(/[^aeiou]/gi);   
vowels.concat([''],consonants).forEach(k => { console.log(k); } );
Source by codereview.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #find #vowel #consonants #string #java #script
ADD COMMENT
Topic
Name
1+8 =