• + 0 comments
    function vowelsAndConsonants(s) {
        let vowelsArray = ['a','e','i','o','u'];
        let vowels = []
        let consonants = []
    
        for(let char of s) {
            vowelsArray.includes(char) ? vowels.push(char) : consonants.push(char)
        }
    
        let vowels_and_consonant = [...vowels, ...consonants]
        vowels_and_consonant.forEach(elem => console.log(elem))
    
    }