Useful reading :
http://discourse.codecombat.com/t/information-about-functions/700/2
Also, another way to do, as shown in the campain (later in the mountain) is to modify the this library (? unsure of the name) by adding a new function to it. It’s useful because any function from this is available within the function you’re defining.
this.functionName = function(_param1 , _param2 ) {
// body
this.say( _param1 +_param2 ) ;
};
this.functionName(2,3) ;