Cloud Code scripts return results by simply "stating" the object to be returned by the Rhino engine.
So while you are undoubtably used to return-ing values, and you will in Javascript functions within the script, for the final exit of your script, you simply state the resulting object.
Note how the CalculateArea script below is returning its result.
// First get our parameters
var width = data.width;
var height = data.height;
// Calculate the area
var result = width * height;
// Return the result
result;
For more information on writing cloud code scripts, see the Cloud Code section of our API Reference, and the Cloud Code Tutorials.
Your feedback is important to us. Please rate this response below. Thanks!