Ah, the law of unintended consequences! It always works to bring a good idea back to reality. All we have to do is to make electric cars and the carbon problem and the pollution problem will go away! Well, not exactly.
Batteries are made of hazardous materials and must be disposed of. The electricity to charge and recharge those batteries must be made in coal- or oil- or natural gas- or nuclear-fired power plants. Each of them has wasteproducts and pollutants, although the least polluting obviously is nuclear.