A science teacher showed the process of electrolysis through this experiment. They sharpened two pencils from both ends and mixed salt into a glass of water. Then they attached the pencils to the battery and put them inside it. The electric current moved from the battery through the pencils to water and salt.