JavaScript Programming
JavaScript > Code Examples
A function with arguments, that returns a value
A function with arguments, that returns a value
<html>
<head>
<title>Happy Codings :-) JavaScript Code Examples</title>
<script type="text/javascript">
function total(a,b){
return a + b
}
</script>
</head>
<body>
<script type="text/javascript">
document.write(total(2,3))
</script>
</body>
</html>