Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the differences between pure and impure functions?
Home
JavaScript
What are the differences between pure and impure functions?
0
votes
asked
Oct 26, 2023
in
JavaScript
by
DavidAnderson
What are the differences between pure and impure functions?
javascript-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 26, 2023
by
DavidAnderson
Some of the major differences between pure and impure function are as below,
Pure function
Impure function
It has no side effects
It causes side effects
It is always return the same result
It returns different result on each call
Easy to read and debug
Difficult to read and debug because they are affected by extenal code
...