JavaScript functions can be called recursively, for example a factorial function as shown below.
The following JavaScript function takes 3 parameters. If the value parameter falls outside the range of the min and max values an alert dialog is displayed to that affect.
function factorial(n)
{if (n > 1)
{return n * factorial(n-1);}
else
{return n;} }
Create and test a HTML document that uses the above function.