How to write the electronic configuration of ions ?

Atoms only losing or gaining electrons give rise to electrically charged particles called ions. The positively charged ions are called cation, while the negatively charged ion is called anion.