Helper function for javascript varargs.