Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Small halp Java?

Name: Anonymous 2013-02-20 15:30

String A = {u i o e u e d};

// how do you check to see if the string only contains vowels?

Name: Sunny ( ´・ω・`) 2013-02-20 15:38

I think yuo make string to char array to then set, difference with new set with 5 vowels and if size!=0
return acordingly

Name: Anonymous 2013-02-20 16:02

Write a function that checks for vowels in a given string.

Name: Anonymous 2013-02-20 17:26

>>1
With a god-damned loop. Your professor or whatever probably expects you to accept both uppercase and lowercase vowels, so implement accordingly.

Name: Anonymous 2013-02-20 17:45

String A = {u i o e u e d};
I want to know what OP thinks he's doing.

Name: Anonymous 2013-02-20 19:53


function only_contains_vowels(string) {
    var vowels = {a: 1, e: 1, i: 1, o: 1, u: 1};
    return string.toLowerCase().split('').every(function(char) {
        return vowels[char];
    });
}

Name: Anonymous 2013-02-20 20:16

>>5
thinks
I don't know if you can analyze this situation in such terms.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List