The element that has the electron configuration of argon (Ar) when it has a stable electron configuration is potassium (K).
Potassium (K) has an atomic number of 19. Its electron configuration is \( [Ar] , 4s^1 \). When potassium loses one electron to become a stable ion (K⁺), it achieves the electron configuration of argon, which is \( [Ar] \).
The other elements mentioned (oxygen, magnesium, and bromine) do not achieve the electron configuration of argon as stably as potassium does when they form their ions.