Hi, there is only one part I’m not sure about for this assignment – I am to [COLOR=”#0000CD”]“Call this function from within JS script and pass to the function the following arguments: no arguments”[COLOR=”#FF0000″]addNum ();[COLOR=”#FF0000″
[CODE]<script type=”text/javascript”>
function addNum(a,b)
{
if (arguments.length < 2)
{
return alert(“Cannot perform addition.”);
}
else if (arguments.length == 2)
{
return alert(“The sum of arguments is: ” + (a + b));
}
else
{
return alert(“The function cannot compute the sum of more than 2 arguments.”);
}
}
//These are the three Function Calls
addNum (3,5,9);
addNum (3,5);
[COLOR=”#FF0000″]addNum ();[/COLOR]
</script>