Go back a few steps NavigationView SwiftUI

NavigationView, NavigationLink, Navigation Management, SwiftUI

I have navigation like:

View1 -> View2 -> View3 -> View4 -> View5

I understand how to go back to the original state, I mean how back from View5 to View1.

***But I really don't know how I can go back from View5 to View3 or View5 to View2.

When I'm using UIKit it is done simply with a navigation stack, but how can I do it with SwiftUI?

Can you share your code to go back to the original state?

Go back a few steps NavigationView SwiftUI
 
 
Q