returning a variable in javascript

 function GetInitialTemp(Temp : String)
 {
    // add the code to get the actual variable
    var tempvar = reference.GetTemperature();

    Temp = tempvar.ToString();

    return Temp;
  }

for some reason it doesn't like return temp, can you not do this in javascript?

You don't need to pass in Temp as an argument. As it seems you are simply assigning to it anyway.

To return the temperature, simply change your method to...

function GetInitialTemp() {
  var tempvar = reference.GetTemperature();
  return tempvar.ToString();

}

or more concise...

function GetInitialTemp() {

      return reference.GetTemperature().ToString();     
}