The name alone is not enough, you need to define the Channel.
For example
activeDocument.channels[activeDocument.channels.length - 1]
signifies the last Channel.
activeDocument.channels[0]
the first (in an RGB image the red one).
If you want to select a Channel based on its name use
activeDocument.channels.getByName(/* insert the name here */)
But to avoid having to write activeDocument over and over again one usually does something like
var theDoc = app.activeDocument
and subsequently uses the variable (in this case called "theDoc").
And yes, the parts between "/*" and "*/" are comments that do not perform as code.
Another way to comment something out is to start a line with "//".