daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Sep 21st, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function vowels(str) {
  2.  
  3.     let vowelCount = 0;
  4.  
  5.     [...str].forEach((char, i) => {
  6.         if (/[AEIOUaeiou]/.test(char) === true) {
  7.             vowelCount += 1;
  8.         }
  9.     });
  10.  
  11.     return vowelCount;
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top