Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

is vowel javascript

const encode = (string) => {
  let newStringArray =string.split("").filter(
    (ch) => ch === "a" || ch === "e" || ch === "i" || ch === "o" || ch === "u"
  );
  return newStringArray;
};

encode('football').forEach(vowel=>{
  console.log(vowel);
})
//o
//o
//a
Source by codereview.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #vowel #javascript
ADD COMMENT
Topic
Name
1+9 =