4. History‎ > ‎

## - scripting language for Macromedia Director

- predecessor to Flash/ActionScript & JavaScript

- Designed for beginners

- Dynamic language -- untyped

- Auto memory management

- Objects

- Cross Platform

-- Example of Lingo syntax of Fibonacci sequence
`on fib n`
`  if n <= 2 then return 1`
`  return fib(n-2) + fib(n-1)`
`end`
(Classic sequence attributed to Fibonacci should be called pingala)

## - Beginner's All-purpose Symbolic Instruction Code

2030 ARRAY F
2040 LET F = 0
2050 LET F = 1
2060 LET N = 1
2080 LET F[N+1] = F[N] + F[N-1]
2090 LET N = N + 1
2100 PRINT F[N];", ";
2120 IF N < 50 THEN GOTO 2080

## HyperTalk

on mouseUp
put "100,100" into pos
repeat with x = 1 to the number of card buttons
set the location of card button x to pos
add 15 to item 1 of pos
end repeat
end mouseUp

- ToolBook

## JavaScript  ECMA-262 -- June 1997  ECMAScript 3 -- December 1999  ECMAScript 5 -- December 2009  ECMAScript 2015 -- June 2015    http://es6-features.org  ECMAScript 2017 -- June 2017nodejs// fibonacci reclusivefunction fib(n) {  if (n <= 2) return 1;  return fib(n-2) + fib(n-1);}

//
fibonacci iteration
function fib_iter(num) {
var a = 1, b = 0, temp;
while (num >= 0){
temp = a;
a = a + b;
b = temp;
num--;
}
return b;
}

Where to learn javascript