Types of Bonds can be predicted by calculating the difference in electronegativity.
If, Electronegativity difference is,
Less than 0.4 then it is Non Polar Covalent
Between 0.4 and 1.7 then it is Polar Covalent
Greater than 1.7 then it is Ionic
For N₂,
E.N of Nitrogen = 3.04
E.N of Nitrogen = 3.04
________
E.N Difference 0.00 (Non Polar Covalent)
For Na₂O,
E.N of Oxygen = 3.44
E.N of Sodium = 0.93
________
E.N Difference 2.51 (Ionic)
For CO₂,
E.N of Oxygen = 3.44
E.N of Carbon = 2.55
________
E.N Difference 0.89 (Polar Covalent)