+ 2
What is function?
5 ответов
+ 4
A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. A function can return data as a result.
+ 4
Add correct revelant tag and mention languages also
+ 2
Function is a code which runs when it is called.
It can be be called by either click event or any type of event handlers.
+ 1
A function is like a machine. It takes input and gives an output. So it is a block of code which gives the output (returns data) depending on the input (also called the parameter). But not all functions return something or takes an input.
- 1
.