How to Count Vowels in Groovy - Code Snippet

How to perform 'Count Vowels' in Groovy.

example.groovy
// Task: Count Vowels
// Language: Groovy

def count_vowels() {
    // Implementation for Count Vowels
    def result = ...; // Initialize variable
    // TODO: Implement core logic here
    // Step 1: Prepare data
    // Step 2: Process Count Vowels
    println("Done");
}
AdSense Slot