JS Function

Last Updated: March 17, 2022

What is a Javascript function?

The javaScript function is a chunk of code with the following properties

  • isolated
  • encapsulated
  • self-contained

and this piece of code will solve a particular problem or do a specific task.


Simple JS function

JavaScript function with parameters