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

Popular posts from this blog

Data Science 

Learning Path for Deep Learning in 2019

Day 6 - Daily Dev Diaries