Mode:
Duration:
1
2
3
4
5
6
7
function fib(n:int):int {
if (n < 2) return n;
return fib(n-1) + fib(n-2);
}
for (var i:int = 0; i < 10; i++) {
trace(fib(i));
}Coding works best on desktop or with an external keyboard.
function fib(n:int):int {
if (n < 2) return n;
return fib(n-1) + fib(n-2);
}
for (var i:int = 0; i < 10; i++) {
trace(fib(i));
}Coding works best on desktop or with an external keyboard.
Generates first 10 Fibonacci numbers.
function fib(n:int):int {
if (n < 2) return n;
return fib(n-1) + fib(n-2);
}
for (var i:int = 0; i < 10; i++) {
trace(fib(i));
}ActionScript is an object-oriented programming language originally developed for Adobe Flash, used to create interactive multimedia, animations, games, and rich web applications.
Origin & Creator
Created by Macromedia (later acquired by Adobe) in 1996; heavily influenced by ECMAScript.
Industrial Note
ActionScript powered most Flash-based games, multimedia apps, and web animations in the 2000s before the decline of Flash.