Sie sind nicht angemeldet.

1

Dienstag, 23. Oktober 2012, 15:19

Unknown number of arguments

how can i loop through unknown number of arguments in an action?

something similar to this javascript function:

Quellcode

1
2
3
4
5
6
7
8
​function arg_values() {
    for(var i = 0; i < arguments.length; i++) {
       console.log(arguments[i] + ' ');                
    }
 }

arg_values('one', 'two', 'three');
arg_values('one', 'two', 'three', 'four');