Create robust functions

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

To generate a random number in JavaScript, use the built-in function Math.random().

Syndicate content