It is unlawful to give, sell, trade, barter or exchange for anything of value any deadly weapon, air rifle, air gun or BB gun, or ammunition for any firearm to an}' person under the age of eighteen years; provided, that this section shall not be construed to prevent any parent or legal guardian from purchasing firearms or ammunition for his child or ward. (Prior code § 7-1-14 (g))