Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

check the string is vowel or not javascript

// check the word is vowel or not
let words = "aeiou";

let newWords = "";

function isVowelOrNot(words) {
   for (let word of words) {
      if (
         word === "a" ||
         word === "e" ||
         word === "i" ||
         word === "o" ||
         word === "u"
      ) {
         newWords = newWords + word;
      }
   }
   if (newWords === words) {
      return true;
   } else {
      return false;
   }
}

let result = isVowelOrNot(words);
console.log(result);
Comment

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
Comment

PREVIOUS NEXT
Code Example
Javascript :: react native vector icons link 
Javascript :: format json command line 
Javascript :: nodejs exit code 
Javascript :: lastindexof() javascript 
Javascript :: window resize done 
Javascript :: how to add lang attribute in next js 
Javascript :: nuxt vuetify google fonts 
Javascript :: iban validation regex for all countries 
Javascript :: vuex getters 
Javascript :: react component will mount new method 
Javascript :: removes null and false values from an array 
Javascript :: how to make a grocery list in javascript 
Javascript :: array as json 
Javascript :: get key for value javascript 
Javascript :: uint8array javascript 
Javascript :: vuejs transform observer to object 
Javascript :: nan javascript 
Javascript :: node js function infinite parameters 
Javascript :: angular img src binding 
Javascript :: see vuex values productin 
Javascript :: vue select first option default 
Javascript :: swift convert array to json 
Javascript :: add new database mongodb 
Javascript :: disabled text color tailwind 
Javascript :: how to change test colo on js button 
Javascript :: vue js count down timer 
Javascript :: next-dev.js?3515:32 Warning: Prop `className` did not match. Server Client 
Javascript :: compare date and time in js 
Javascript :: how to make bootstrap navbar to change on scroll 
Javascript :: jquery: finding all the elements containing the text present in an array 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =