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 (or arguments). The function parameter list will be in between those parenthesis ( ). The parameters are optional and we might call them variables inside the a functions. The body of the function is enclosed in curly braces {}, which may include one or more statements inside them.
1 comment
[ 0.21 ms ] story [ 8.4 ms ] threadJavaScript 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 (or arguments). The function parameter list will be in between those parenthesis ( ). The parameters are optional and we might call them variables inside the a functions. The body of the function is enclosed in curly braces {}, which may include one or more statements inside them.