allalgorithms-js

Vowels

Method calculate vowels in word, phrase. Vowels are the characters ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’

Install

npm install allalgorithms

Usage

const allalgorithms = require('allalgorithms');

const str = 'How do you do?';

console.log(allalgorithms.strings.vowels(str));
// -> 5

API

vowels(str)

Returns count of vowels inside string

Params: