This is one of the reasons you should write tests as you develop - it ensures you have a consistent baseline you can apply.
As a developer you are constantly learning & evolving. If you're not confident enough to draw a line under what you've done, step back and evaluate your position and rewrite it when needed - that's fine, but others find it an effective approach to building something bigger, better and more sustainable.