How to change some channel's info with javascript?

Do you get an error? What does it say?