Creating Functions
Function declaration or creating functions is different in different programming languages. Usually, a function keyword is specified, followed by the function name, parenthesis (with function parameters, if any), and then comes the body of the function.
Now let's see how we can create functions in JavaScript.
JavaScript functions are declared using the function keyword. This is followed by the function name and parenthesis. The body of the function is denoted using curly braces.
xxxxxxxxxxfunction js_func(){ console.log("Hello World!")}OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment


