the table shows the types of elements that form two componds. which of the following statements is true about how the bonding occurred to create the two compounds

Electrons are shared in compound X and transferred in compound Y.
1. ionic bonding
Bonding that occurs due to electron transfer. Can occur in metal and non-metal atoms. To get stability, atoms release or bind electrons to get stable electron regulation from noble gases
2. covalent bonding
Bonding that occurs due to shared use of electron pairs
The two bound atoms contribute their electrons to produce bonds
Generally occurs in non-metallic elements
So compound X = covalent bond (metal with metal) and compound Y= ionic bond(metal with non metal)