A function with arguments, that returns a value
<html> <head> <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>