Important Notice:

Advantages of Function

Advantages of Function

16 views 1 min read

Advantages of Function 1. Code Reusability

एक ही function को कई बार use किया जा सकता है।

Example:-

function hello() {
console.log("Hello");
}

hello();
hello();
hello();

 

2.Time Saving

बार-बार code लिखने की जरूरत नहीं होती इसलिए समय बचता है।

3. Easy Debugging

अगर error आती है तो केवल function के अंदर check करना पड़ता है।

4. Organized Code

Code अलग-अलग parts में divide हो जाता है जिससे समझना आसान होता है।

5. Better Readability

Program को पढ़ना और समझना आसान हो जाता है।

Related Notes