Answer:
Step-by-step explanation:
Here, a balance between attraction between nucleus and electrons, and electron-electron, and nuclei-nuclei repulsion play role.
All chemical bonds are formed by overlapping of orbitals. If the electronegativity of the two elements forming the bond is very different (elements from the 1st ,2nd groups with elements of 7th group) then ionic bond are formed. If the electronegativities are more similar, then overlapping is stronger, and covalent bonds are formed.