The main function of a welding electrode is to carry electric current and create an arc that melts the metal for welding. The electrode also supplies filler metal to the joint, which helps in forming a strong weld. In coated electrodes, the flux coating produces protective gases and slag to protect the molten weld metal from contamination by air.