Hey hdnine, and welcome around here !
First of all, having a background in JS too, I went through the same at first. The first thing you shouldn't do is try to find a direct link between how you would write it in JS and in C2. It's not the same and you won't be able to do it like this.
My first tip on your problem is : you cannot change a fade time during runtime. When you create your objects, you have to add a behavior Fade on it, and set its time to fade in and out from the editor. If you want to have a fade in AND a fade out, but not at the same time, not triggered together, just add 2 behaviors Fade to your object and set them to respectively fade In and fade Out. You can rename behaviors too, to make it more readable.
Then, you will be able to write a function "ToggleFade". Here is a sample capx to show how I would do it : capx