The electron which are acquired to compete the shell or to make the atom stable is called valency.
For ex:- Nitrogen :atomic no is 7 and electronic configuration is 2,5.
hence it needs 3electrons to make the shell stable. so its valency is minus 3.
2. boron :- atomic no. is 5 it's electronic configuration is 2,3. It can lose 3 three electrons instead of gaining 5 electrons . so its valency is plus 3.
Valency is the combining capacity of an atom with the atoms of other elements so as to form the molecules of compounds Valence can , therefore be defined in terms of loss or gain of electrons as well