Javascript: Convert arguments into array