Functions:
Return is optional , if function needs to return a data use return , else don’t.
return statement could be written as return a or return(a), both are correct syntax. Recommended is ‘return a’
Syntax:
function function_name(parameters){
some_code;
return something;
}
Example:
function sayHello(a,b,c) {
document.write ("Hello there!"+ "br />");
return a+b
}
a = sayHello(11,2,"e")
document.write (a);