Create robust functions
Submitted by georgec on Mon, 01/21/2008 - 15:14.To define a function that can accept arbitrary number of parameters in
JavaScript, invoke the arguments array within the function. This special array
contains all of the parameters passed into it.
Generating a random number
Submitted by georgec on Mon, 01/21/2008 - 15:09.To generate a random number in JavaScript, use the built-in function Math.random().
