Parameters and return value

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

<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