You can reverse the clauses too, but the comma disappears!
- If you stand in the rain, you get wet. You get wet if you stand in the rain.
- If it rains, we will cancel the trip. We will cancel the trip if it rains.
- If I won the lottery, I would be rich. I would be rich if I won the lottery.
- If I hadn't been sick, I would have gone to the party.
I would have gone to the party if I hadn't been sick