Iodoalkanes react quickly by substitution and elimination while fluoroalkanes barely react, even though fluorine is the most electronegative halogen.
The rule: a good leaving group is a weak base, one that is stable keeping the electron pair it takes from carbon instead of sharing it again.
Down the halogen group the ions get larger and more polarizable, so the same −1 charge is spread thinner on iodide than on fluoride. The C–I bond is also the weakest carbon–halogen bond.
Check with conjugate acids: the stronger the acid HX, the weaker the base X⁻. HI is a strong acid and HF a weak one, so fluoride is the strongest base and the worst leaving group.
That gives the ranking I⁻ > Br⁻ > Cl⁻ > F⁻. Water and sulfonates such as tosylate are also good leaving groups; hydroxide is poor until it is protonated.