function declaration
function sum(num1,num2){
return num1+num2;
}
function expression
var sum=function(num1,num2){
return num1+num2;
};
return statement in a function
A return statement can have no return value, in this case: return; or without a return statement in the function, the function will return a value after execution has stopped. This usage is generally required to stop the function execution early without returning a value.
return false to prevent the element's default event.
return returns the return value of its function.