package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ trace(sum(1,2,3,4,5)); // Displays: 15 } function sum(... numbers):Number { var result:Number = 0; for each (var num:Number in numbers) { result += num; } return result; } }}
Name (required)
email (will not be published) (required)
Website