DEV Community

skptricks
skptricks

Posted on

Understanding Pure Function In Javascript

Post Link : Understanding Pure Function In Javascript

In this tutorial, we are going to discuss javascript pure function. These functions are widely used in javascript and we used for some specific purpose.

What Is A Pure Function?
The definition of a pure function is:
The function always returns the same result if the same arguments are passed in. It does not depend on any state, or data, change during a program’s execution. It must only depend on its input arguments.
The function does not produce any observable side effects such as network requests, input and output devices, or data mutation.

Understanding Pure Function In Javascript

Top comments (0)