Why use return?

I’m trying to understand the purpose of using return in functions. I’m reading Robert Penner’s “Programming Macromedia Flash MX” and there is a good example of how to apply functions using the prototype feature:

// Code start

MovieClip.prototype.spin = function (angle) {
this._rotation += angle;
return this._rotation;

result = _level5.box.spin(10);

// Code stop

I created a second movieclip called box2, and rather than call it through a variable, I simply called the function this way:


They both produce the same result. I’m just wondering what the purpose is for using return in this particular case. I unfortunately can’t seem to find more information on this simple idea. I am reading ahead but I am afraid if I don’t understand this concept now, I’m going to miss something very important in the future!

Any tips would be greatly appreciated.