SHOW:
|
|
- or go back to the newest paste.
1 | local test = {}; | |
2 | table.insert(test,"this"); | |
3 | table.insert(test,"is"); | |
4 | table.insert(test,"recursion!"); | |
5 | ||
6 | local function RecursivePrint(index) | |
7 | local text = test[index]; | |
8 | - | if text == nil |
8 | + | if text == nil then |
9 | return; | |
10 | else | |
11 | print(text); | |
12 | RecursivePrint(index+1); | |
13 | end | |
14 | end | |
15 | ||
16 | RecursivePrint(1); |