Count the vowels · ספור את התנועות
Count the vowels
Count the vowels (a e i o u) in a String, treating upper- and lower-case the same. Lower-case it first with s.toLowerCase(), then loop with s.charAt(i) and compare against each vowel.
ספור את התנועות
ספור את התנועות (a e i o u) ב-String, תוך התעלמות מהבדל בין אותיות גדולות לקטנות. המר את האותיות לאותיות קטנות תחילה באמצעות s.toLowerCase(), ולאחר מכן סרקו בעזרת s.charAt(i) והשוו כל אות לתנועה.
Complete countVowels(String s) so it returns how many letters are vowels (a, e, i, o, u), ignoring case. · שלם את countVowels(String s) כך שתחזיר כמה אותיות הן תנועות (a, e, i, o, u), ללא הבחנת קייס.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.