Parameters and return value

Sunny.Sagar
Posted by Sunny.Sagar under JavaScript category on | Points: 40 | Views : 302
<script language="javascript" type="text/javascript">
function Add(a, b) {
var sum = a + b;
return sum;
}
</script>

<input type="button" id="btnTest" onclick="alert(Add(5, 6))" value="Sum" />


A function can accept one or more parameters and may or may not return value

Comments or Responses

Login to post response