JavaScript functions are defined using the function keyword followed by a name for the function and a pair of parentheses containing zero or more comma-separated parameters. The parameters are optional and we might call them variables inside the functions. The body of the function is enclosed in curly braces, which may include one or more statements inside them.
Sort: