There are six electrons in the covalent bonds.
Two N atoms would be :N:· + ·:N:
An N₂ molecule would be :N:::N: or :N≡N:
This gives each N atom an octet of eight electrons in its valence shell.
This is known as a synthesis reaction. A+B->C
Hope this helps!