Advertisements
Advertisements
Question
What is the use of function?
Short Note
Solution
- Functions are used to encapsulate code that performs a specific task.
- Functions are used to keep code that performs a particular job in one place in order to enhance reusability and program clarity.
shaalaa.com
JavaScript Functions
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
The parameters work as ______.
Larger programs are divided into smaller are called ______.
Which of the following is used to enhance reusability and program clarity.
What is a function in JavaScript?
Write a note on Library functions.
Write a program in JavaScript to find the cube of a number using function.
Write a program in JavaScript to find the sum of 10 numbers using function?