You will lose more fat but less muscle by fasting than you would on a conventional weight-loss diet.
You’ll also find fasting much easier to stick to. You fast only for short periods: one or two days a week, and the rest of the time you are free to live normally. You can be a faster for life, not just for a few weeks.