Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

function thaty counts number of vowels code example

Example 1: 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);
};

Example 2: how to make a vowel counter in javascript

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

Tags:

Javascript Example

Related

check db size postgres code example remove accent in a string in R code example bash create directory code example powershell create junction code example nested if in javascript example colour picker chrome extension code example vscode flake8 linter ignore line length code example spl register autoload code example state function reactjs code example increasing image size in css code example jquery event on button click code example ionic change app name code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy