Monday 16 July 2012

How to create Function with arguments, that returns a value using javascript


<!DOCTYPE html>
<html>
<body>

<p>This example calls a function which perfoms a calculation, and returns the result:</p>

<p id="demo"></p>

<script type="text/javascript">
function myFunction(a,b)
{
return a*b;
}

document.getElementById("demo").innerHTML=myFunction(4,3);
</script>

</body>
</html>

0 Responses to “How to create Function with arguments, that returns a value using javascript”

Post a Comment