JS | Count vowel from a String

const vowel =  (str) => {  count = 0;  for(char of str) {    if('aeiou'.includes(char)) {
count++;
}
}
return count;
}console.log(vowel('hello world')) //3

Keep learning, keep growing!

--

--

--

Working in Walmart as UI Developer | Mentor | React | JavaScript | HTML | CSS

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Use Map, Filter and Reduce

open laptop on a desk stock photo

Flutter Getx Routes Contants

Introducing Crunchyroll Config Delta

Resources for Launching Your JavaScript Career

Basic Concepts and Applications for Event Listeners in React.js

Angular 9 Test Coverage and Reporting(Karma + Cypress 5)

React : Components, Functional & Class Components

I fixed Google’s scripting tool

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
iAmSonika | www.startlearncoding.com

iAmSonika | www.startlearncoding.com

Working in Walmart as UI Developer | Mentor | React | JavaScript | HTML | CSS

More from Medium

how does javascript Promise work under the hood?

JavaScript Interview Questions & Answers

Array Fundamentals in JavaScript

Vanilla JavaScript, Learning functions