Grocery list's topsy-turvy adventure

Report a typo
Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
Create a function called processGroceries that takes a MutableList of grocery items, reverses the list, and prints each item's index and name, but only for items that don't start with the letter 'A'. Can you reorder the lines of code to solve this problem?
Reorder lines using drag or arrows. Adjust indentation with left buttons
                groceries.reverse()
              
                }
              
                if (!item.startsWith('A')) {
              
                println("$index: $item")
              
                fun processGroceries(groceries: MutableList<String>) {
              
                }
              
                for ((index, item) in groceries.withIndex()) {
              
                }
              

Create a free account to access the full topic