Writing functions that return a value

Okay, this is going to be an easy question but one that is taking me far too long to find an answer for.

I am trying to recall the syntax for writing a function that returns a variable, something along the lines of:

private var variable = 42;

function int GetMeaning(){
   return variable;
}

The Unity reference information, while being fantastic on the classes and functions themselves, doesn't appear to have anything on the actual syntax of Functions, For loops and so on. Is there a reference for this somewhere? So far I have just been copying the syntax used in other scripts I could find that implemented the same methods.

Like this:

Javascript:

function GetMeaning() : outputType {
    return variable;
}

C#:

public outputType GetMeaning() {
    return variable;
}