All versions of JavaScript offer if , if-else , for , and while constructions. Iteration constructions provide break and continue statements to modify control structure execution. JavaScript functions may or may not return a value. There is only one kind of JavaScript function. A value is returned only if the function includes a return keyword followed by the value to be returned.
Return values can be of any data type.
JavaScript functions cannot be overloaded. A JavaScript function accepts zero or more arguments, regardless of the number of parameter variables defined for the function. All arguments are automatically assigned to the arguments array, which is a property of a function object. Parameter variable data types are not predefined. Error trapping techniques depend on JavaScript version.