Fasting does not helps in loosing weight.It may be just too temporary and as you tend to resume to normal food you tend to gain back the weight.During fasting,the basal metabolic rate of your body tends to reduce.This is body's mechanism to restore the energy.As the BMR reduces your ability to loose weight also reduces,and the body tends to store more energy.