How can I achieve a ForEach result that displays each array member, along with numerical values depending on the list count, that increment up for each item
Example would be 1 "Turkey" 2 "Ham" 3 "Mayo"
struct EditorDirections: View {
@State private var recipeDirections: [String] = ["Ham", "Turkey", "Mayo"]
var body: some View {
VStack{
List{
ForEach(recipeDirections, id: \.self){ recipe in
HStack{
Text()// show 1, 2, 3
Text(recipe)
}
}
}