InterviewSolution
Saved Bookmarks
| 1. |
Difference between pure and impure functions. |
|
Answer» Difference between pure and impure functions: Pure Functions: A function is” said to be a pure function when it return information about the state of an object. These functions contain a return statement in order to pass back the result generated by the module or function. Impure Functions: A function is said to be an impure function when they change the state of the variables but they do not return any value. They do not have any return statement. Their function header bears Void’ as a return type. It is also known as Mutator function. |
|