If it has carbs.
However, a couple of important notes. Firstly, sometimes your body gives an insulin response even if no carbs because our bodies are programmed to dump insulin in preparation for food. So your body may do the dirty insulin thing because you told it there was a food thing happening. Whether you meant to or not.
Secondly, having something sweet, even without carbs can also increase cravings pretty dramatically.
It’s really just not worth it.
Depends if it has sugar or sugar-free. Fun fact: the most in-depth and commonly cited experiment in fasting science (Cahill et al.) Allowed unlimited sugar-free gum as well as unlimited water during fasting experiments at first. Some subjects began obsessively chewing gum to deal with the stress of fasting, so they instituted a limit on the number of pieces that they could chew daily.