w3c js function code example Example: declare function javascript Click to copyfunction myFunction(var1, var2) { return var1 * var2; }