" ; $args = func_get_args(); if ( $numargs >= 2 ) { echo "第二個參數為: " . func_get_arg ( 1 ) . "" ; } } demo ( 'a' , 'b' , 'c' ); ``` 2. javascript動態累加arguments.length,動態傳參 ``` function box() { var sum=0; for (var index = 0; index < arguments.length; index++) { sum += arguments[index]; } return sum; } alert(box(1,2)); ```
function box() { var sum=0; for (var index = 0; index < arguments.length; index++) { sum += arguments[index]; } return sum; } alert(box(1,2)); ```