$$\text{R--Cl} / \text{R--Br} + \text{NaI} \xrightarrow{\text{Dry Acetone}} \text{R--I} + \text{NaCl} \downarrow / \text{NaBr} \downarrow$$
Concept: Alkyl chlorides or bromides are converted to alkyl iodides by treatment with sodium iodide ($$\text{NaI}$$) in dry acetone.
According to Le Chatelierβs principle, the reaction is driven forward because $$\text{NaCl}$$ and $$\text{NaBr}$$ are insoluble in dry acetone and precipitate out of solution.