A function is written as a code block (inside curly { } braces), preceded by the function keyword:function functionname(){some code to be executed}The code inside the function will be executed when "someone" calls the function.The function can be called directly when an event occurs (like when a user clicks a button), and it can be called from "anywhere" by JavaScript code.
Javascript
Topic: JS Functions
What is a JavaScript Function Syntax?
Browse random answers:
What is a JavaScript Function Syntax?
How to get value from RadioButtonList control?
How to Calling a Function with Arguments?
What is a Local JavaScript Variables?
What is a Global JavaScript Variables?