Search
 
SCRIPT & CODE EXAMPLE
 

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); } );
Comment

how to make a vowel counter in javascript

const vowelCount = str => {
  let vowels = /[aeiou]/gi;
  let result = str.match(vowels);
  let count = result.length;

  console.log(count);
};
Comment

how to make a vowel counter in javascript

function countVowels(str) {
  return str.match(/[aeiou]/g).length;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: discord.js arguments 
Javascript :: statusbar height react native 
Javascript :: TypeError: client.guilds.forEach is not a function 
Javascript :: mil to km javascript 
Javascript :: get last element in an array jqury 
Javascript :: luxon timestamp 
Javascript :: javascript countdown timer 
Javascript :: Select options of Select2 control based on values using Jquery 
Javascript :: angular 404 on refresh 
Javascript :: mock a function jest react 
Javascript :: how to change css style on click 
Javascript :: reverse a string without affecting special characters in javascript 
Javascript :: js pow 
Javascript :: javascript get typeof array 
Javascript :: js throw custom error 
Javascript :: validate password javascript 
Javascript :: docker react 
Javascript :: sort string 2d array in javascript 
Javascript :: javascript text word wrap replace 
Javascript :: react not getting img by src 
Javascript :: date js 
Javascript :: alphabet only in jquery 
Javascript :: loop through array backwards 
Javascript :: javascript string contains function 
Javascript :: javascript assignment operators 
Javascript :: chart.js chart is not defined 
Javascript :: onchange js 
Javascript :: angular {{}} new line 
Javascript :: javascript string contains character 
Javascript :: chess 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =