What's new for me ? JavaScript
05/05/19
Use of REGEX in printing vowels by consonants in different line from input string:
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); } );
Comments
Post a Comment