Should you avoid late-night meals to prevent weight gain in the long term?

Should you avoid late-night meals to prevent weight gain in the long term?