"You name it" is a set phrase, meaning that anything that the other person can name is included in a category (not meant completely literally, of course). In this case "it" logically refers to a method of losing weight, but mainly the phrase is processed as a set expression. The question mark at the end of that sentence is unexpected.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.