Answer : The type of compound created is Ionic compound and the chemical formula is KCl.
Explanation :
- Potassium has 1 electron in its valence shell and chlorine has 7 electrons in its valence shell.
- The potassium loses 1 valence electron & make a positive charged ion and chlorine picks it up & make a negative charged ion and then they attract to each other.
- Potassium and chlorine atom combine to form potassium chloride by the ionic bonding.
- An ionic compound is made of a metal and non-metal element. And in this case, potassium is a metal element and chlorine is a non-metal element.
The ionic compound formation is,

The Chemical formula is KCl.