Nitrogen is the seventh element with a total of 7 electrons. In writing the electron configuration for nitrogen the first two electrons will go in the 1s orbital. Since 1s can only hold two electrons the next 2 electrons for N goes in the 2s orbital. The remaining three electrons will go in the 2p orbital. Therefore the N electron configuration will be 1s22s22p3.In writing the electron configuration for Chlorine the first two electrons will go in the 1s orbital. Since 1s can only hold two electrons the next 2 electrons for Chlorine go in the 2s orbital. The next six electrons will go in the 2p orbital. The p orbital can hold up to six electrons. We'll put six in the 2p orbital and then put the next two electrons in the 3s. Since the 3s if now full we'll move to the 3p where we'll place the remaining five electrons. Therefore the Chlorine electron configuration will be1s22s22p63s23p5.
As shown in image.