1// check the word is vowel or not
2let words = "aeiou";
3
4let newWords = "";
5
6function isVowelOrNot(words) {
7 for (let word of words) {
8 if (
9 word === "a" ||
10 word === "e" ||
11 word === "i" ||
12 word === "o" ||
13 word === "u"
14 ) {
15 newWords = newWords + word;
16 }
17 }
18 if (newWords === words) {
19 return true;
20 } else {
21 return false;
22 }
23}
24
25let result = isVowelOrNot(words);
26console.log(result);