DEV Community

Akash
Akash

Posted on

Functions in JAVASCRIPT

  • Function includes set of instructions
  • Function is a block of code performs is a specific task to avoid rewriting code again and again
  • It is easy to reuse
  • Function has parameter and return value (e.g) function Make Biriyani ( Rice,chicken ) { Console.log (" chicken Biriyani"); }

EXECUTION:-

1.Declare function and and give parameters( rice and chicken)
2.store the given things in function
3.And print result

NOTES :

  • Arguments in function are very flexible
  • If javascript called missing arguments it remains undefined
  • Returning function to use a same value to write a same code again and again
  • We can call the same function multiple times
  • Variables inside a function cannot be used outside of function

(TBD)
Function in python
Function in Java
Function in react

Top comments (0)