What is the function of water in a set up for the preparation of hydrogen gas

provides the hydrogen