Two atoms of similar electronegativity would be expected to form a covalent compound. However if there is significant electronegativity difference, then they will form ionic compound. For example, N and O have similar electronegativity and form a covalent compound NO. However there is significant electronegativity difference between Na and Cl, they will form ionic compound NaCl.